Hello,
tried to reproduce the issue and got on a first run this stack:
(gdb) bt
#0 iter_thread_int (fth=0x157681210) at rect.c:500
#1 0x00007fffaa36bad0 in iter_thread_float () at rect.c:253
#2 0x00007fffa9c9b010 in start_thread (arg=0x7fffa740f100) at
pthread_create.c:444
#3 0x00007fffa9d3e364 in .LY__clone () at
../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:107
(gdb)
More details in attached file.
Kind regards,
Bernhard
https://people.debian.org/~gio/dqib/
https://gitlab.com/giomasce/dqib/-/jobs/6565595570/artifacts/download?file_type=archive
echo "set enable-bracketed-paste off" >> /etc/inputrc
echo "deb-src http://deb.debian.org/debian/ unstable main" >>
/etc/apt/sources.list
apt update
apt install systemd-coredump flam3-utils htop gdb libflam3-0-dbgsym
flam3-utils-dbgsym
apt build-dep flam3
mkdir /home/benutzer/source/flam3/orig -p
cd /home/benutzer/source/flam3/orig
apt source flam3
benutzer@debian:~$ env seed=$RANDOM issac_seed=$RANDOM flam3-genome > /dev/null
Segmentation fault (core dumped)
benutzer@debian:~$
benutzer@debian:~$ coredumpctl list -q
TIME PID UID GID SIG COREFILE EXE
SIZE
Sat 2024-04-13 08:59:01 UTC 819 1001 1001 SIGSEGV present
/usr/bin/flam3-genome 1.8M
export DEBUGINFOD_URLS="https://debuginfod.debian.net"
echo "set debuginfod enabled on" >> .gdbinit
cd /home/benutzer/source/flam3/orig/flam3-3.1.1+ds2
benutzer@debian:~$ coredumpctl gdb --debugger-arguments=-q 819
Hint: You are currently not seeing messages from other users and the system.
Users in groups 'adm', 'systemd-journal' can see all messages.
Pass -q to turn off this notice.
PID: 819 (flam3-genome)
UID: 1001 (benutzer)
GID: 1001 (benutzer)
Signal: 11 (SEGV)
Timestamp: Sat 2024-04-13 08:58:58 UTC (8min ago)
Command Line: flam3-genome
Executable: /usr/bin/flam3-genome
Control Group: /system.slice/ssh.service
Unit: ssh.service
Slice: system.slice
Boot ID: 264b6d6ac02b49fcbf29cf0bda4825ba
Machine ID: 9d83830458974e43a3f2f91f73a6969d
Hostname: debian
Storage:
/var/lib/systemd/coredump/core.flam3-genome.1001.264b6d6ac02b49fcbf29cf0bda4825ba.819.1712998738000000.zst
(present)
Size on Disk: 1.8M
Message: Process 819 (flam3-genome) of user 1001 dumped core.
Stack trace of thread 1051:
#0 0x00007fffaa36b444 n/a (libflam3.so.0 + 0x2b444)
#1 0x00007fffaa36bad0 n/a (libflam3.so.0 + 0x2bad0)
#2 0x00007fffa9c9b010 n/a (libc.so.6 + 0x9b010)
#3 0x00007fffa9d3e364 __clone (libc.so.6 + 0x13e364)
ELF object binary architecture: PowerPC64
Reading symbols from /usr/bin/flam3-genome...
(No debugging symbols found in /usr/bin/flam3-genome)
[New LWP 1051]
[New LWP 819]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc64-linux-gnu/libthread_db.so.1".
Core was generated by `flam3-genome '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fffaa36b444 in ?? () from /lib/powerpc64-linux-gnu/libflam3.so.0
[Current thread is 1 (Thread 0x7fffa740f100 (LWP 1051))]
(gdb) bt
#0 0x00007fffaa36b444 in ?? () from /lib/powerpc64-linux-gnu/libflam3.so.0
#1 0x00007fffaa36bad0 in ?? () from /lib/powerpc64-linux-gnu/libflam3.so.0
#2 0x00007fffa9c9b010 in start_thread (arg=0x7fffa740f100) at
pthread_create.c:444
#3 0x00007fffa9d3e364 in .LY__clone () at
../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:107
(gdb)
(gdb) noshare
(gdb) share
...
(gdb) bt
#0 iter_thread_int (fth=0x157681210) at rect.c:500
#1 0x00007fffaa36bad0 in iter_thread_float () at rect.c:253
#2 0x00007fffa9c9b010 in start_thread (arg=0x7fffa740f100) at
pthread_create.c:444
#3 0x00007fffa9d3e364 in .LY__clone () at
../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:107
(gdb)
(gdb) directory /home/benutzer/source/flam3/orig/flam3-3.1.1+ds2
Source directories searched:
/home/benutzer/source/flam3/orig/flam3-3.1.1+ds2:$cdir:$cwd
(gdb) list iter_thread_int
248 pthread_exit((void *)0);
249 #endif
250
251 }
252
253 static void iter_thread(void *fth) {
254 double sub_batch;
255 int j;
256 flam3_thread_helper *fthp = (flam3_thread_helper *)fth;
257 flam3_iter_constants *ficp = fthp->fic;
258 struct timespec pauset;
259 int SBS = ficp->spec->sub_batch_size;
260 int fuse;
261 int cmap_size = ficp->cmap_size;
262 int cmap_size_m1 = ficp->cmap_size-1;
263
264 double eta = 0.0;
265
266 fuse = (ficp->spec->earlyclip) ? FUSE_28 : FUSE_27;
267
268 pauset.tv_sec = 0;
269 pauset.tv_nsec = 100000000;
270
271
272 if (fthp->timer_initialize) {
273 *(ficp->progress_timer) = 0;
274 memset(ficp->progress_timer_history,0,64*sizeof(time_t));
275 memset(ficp->progress_history,0,64*sizeof(double));
276 *(ficp->progress_history_mark) = 0;
277 }
278
279 for (sub_batch = 0; sub_batch < ficp->batch_size; sub_batch+=SBS) {
280 int sub_batch_size, badcount;
281 time_t newt = time(NULL);
282 /* sub_batch is double so this is sketchy */
283 sub_batch_size = (sub_batch + SBS > ficp->batch_size) ?
284 (ficp->batch_size - sub_batch) : SBS;
285
286 if (fthp->first_thread && newt != *(ficp->progress_timer)) {
287 double percent = 100.0 *
288 ((((sub_batch / (double) ficp->batch_size) +
ficp->temporal_sample_num)
289 / ficp->ntemporal_samples) +
ficp->batch_num)/ficp->nbatches;
290 int old_mark = 0;
291 int ticker;
292
293 if (ficp->spec->verbose)
294 fprintf(stderr, "\rchaos: %5.1f%%", percent);
295
296 *(ficp->progress_timer) = newt;
297 if
(ficp->progress_timer_history[*(ficp->progress_history_mark)] &&
298 ficp->progress_history[*(ficp->progress_history_mark)]
< percent)
299 old_mark = *(ficp->progress_history_mark);
300
301 if (percent > 0) {
302 eta = (100 - percent) * (*(ficp->progress_timer) -
ficp->progress_timer_history[old_mark])
303 / (percent - ficp->progress_history[old_mark]);
304
305 if (ficp->spec->verbose) {
306 ticker = (*(ficp->progress_timer)&1)?':':'.';
307 if (eta < 1000)
308 ticker = ':';
309 if (eta > 100)
310 fprintf(stderr, " ETA%c %.1f minutes", ticker, eta /
60);
311 else
312 fprintf(stderr, " ETA%c %ld seconds ", ticker,
(long) ceil(eta));
313 fprintf(stderr, " \r");
314 fflush(stderr);
315 }
316 }
317
318 ficp->progress_timer_history[*(ficp->progress_history_mark)] =
*(ficp->progress_timer);
319 ficp->progress_history[*(ficp->progress_history_mark)] =
percent;
320 *(ficp->progress_history_mark) =
(*(ficp->progress_history_mark) + 1) % 64;
321 }
322
323 /* Custom progress function */
324 if (ficp->spec->progress) {
325 if (fthp->first_thread) {
326
327 int rv;
328
329 /* Recalculate % done, as the other calculation only
updates once per second */
330 double percent = 100.0 *
331 ((((sub_batch / (double) ficp->batch_size) +
ficp->temporal_sample_num)
332 / ficp->ntemporal_samples) +
ficp->batch_num)/ficp->nbatches;
333
334 rv =
(*ficp->spec->progress)(ficp->spec->progress_parameter, percent, 0, eta);
335
336 if (rv==2) { /* PAUSE */
337
338 time_t tnow = time(NULL);
339 time_t tend;
340 int lastpt;
341
342 ficp->aborted = -1;
343
344 do {
345 #if defined(_WIN32) /* mingw or msvc */
346 Sleep(100);
347 #else
348 nanosleep(&pauset,NULL);
349 #endif
350 rv =
(*ficp->spec->progress)(ficp->spec->progress_parameter, percent, 0, eta);
351 } while (rv==2);
352
353 /* modify the timer history to compensate for the pause
*/
354 tend = time(NULL)-tnow;
355
356 ficp->aborted = 0;
357
358 for (lastpt=0;lastpt<64;lastpt++) {
359 if (ficp->progress_timer_history[lastpt]) {
360 ficp->progress_timer_history[lastpt] += tend;
361 }
362 }
363
364 }
365
366 if (rv==1) { /* ABORT */
367 ficp->aborted = 1;
368 #ifdef HAVE_LIBPTHREAD
369 pthread_exit((void *)0);
370 #else
371 return;
372 #endif
373 }
374 } else {
375 if (ficp->aborted<0) {
376
377 do {
378 #if defined(_WIN32) /* mingw or msvc */
379 Sleep(100);
380 #else
381 nanosleep(&pauset,NULL);
382 #endif
383 } while (ficp->aborted==-1);
384 }
385 #ifdef HAVE_LIBPTHREAD
386 if (ficp->aborted>0) pthread_exit((void *)0);
387 #else
388 if (ficp->aborted>0) return;
389 #endif
390 }
391 }
392
393 /* Seed iterations */
394 fthp->iter_storage[0] = flam3_random_isaac_11(&(fthp->rc));
395 fthp->iter_storage[1] = flam3_random_isaac_11(&(fthp->rc));
396 fthp->iter_storage[2] = flam3_random_isaac_01(&(fthp->rc));
397 fthp->iter_storage[3] = flam3_random_isaac_01(&(fthp->rc));
398
399 /* Execute iterations */
400 badcount = flam3_iterate(&(fthp->cp), sub_batch_size, fuse,
fthp->iter_storage, ficp->xform_distrib, &(fthp->rc));
401
402 #if defined(HAVE_LIBPTHREAD) && defined(USE_LOCKS)
403 /* Lock mutex for access to accumulator */
404 pthread_mutex_lock(&ficp->bucket_mutex);
405 #endif
406
407 /* Add the badcount to the counter */
408 ficp->badvals += badcount;
409
410 /* Put them in the bucket accumulator */
411 for (j = 0; j < sub_batch_size*4; j+=4) {
412 double p0, p1, p00, p11;
413 double dbl_index0,dbl_frac;
414 double interpcolor[4];
415 int ci, color_index0;
416 double *p = &(fthp->iter_storage[j]);
417 bucket *b;
418
419 if (fthp->cp.rotate != 0.0) {
420 p00 = p[0] - fthp->cp.rot_center[0];
421 p11 = p[1] - fthp->cp.rot_center[1];
422 p0 = p00 * ficp->rot[0][0] + p11 * ficp->rot[0][1] +
fthp->cp.rot_center[0];
423 p1 = p00 * ficp->rot[1][0] + p11 * ficp->rot[1][1] +
fthp->cp.rot_center[1];
424 } else {
425 p0 = p[0];
426 p1 = p[1];
427 }
428
429 if (p0 >= ficp->bounds[0] && p1 >= ficp->bounds[1] && p0 <=
ficp->bounds[2] && p1 <= ficp->bounds[3]) {
430
431 double logvis=1.0;
432 bucket *buckets = (bucket *)(ficp->buckets);
433
434 /* Skip if invisible */
435 if (p[3]==0)
436 continue;
437 else
438 logvis = p[3];
439
440 b = buckets + (int)(ficp->ws0 * p0 - ficp->wb0s0) +
441 ficp->width * (int)(ficp->hs1 * p1 - ficp->hb1s1);
442
443 #ifdef USE_FLOAT_INDICES
444 color_index0 = 0;
445
446 //fprintf(stdout,"%.16f\n",p[2]*256.0);
447
448 while(color_index0 < cmap_size_m1) {
449 if (ficp->dmap[color_index0+1].index > p[2])
450 break;
451 else
452 color_index0++;
453 }
454
455 if (p[3]==1.0) {
456 bump_no_overflow(b[0][0],
ficp->dmap[color_index0].color[0]);
457 bump_no_overflow(b[0][1],
ficp->dmap[color_index0].color[1]);
458 bump_no_overflow(b[0][2],
ficp->dmap[color_index0].color[2]);
459 bump_no_overflow(b[0][3],
ficp->dmap[color_index0].color[3]);
460 bump_no_overflow(b[0][4], 255.0);
461 } else {
462 bump_no_overflow(b[0][0],
logvis*ficp->dmap[color_index0].color[0]);
463 bump_no_overflow(b[0][1],
logvis*ficp->dmap[color_index0].color[1]);
464 bump_no_overflow(b[0][2],
logvis*ficp->dmap[color_index0].color[2]);
465 bump_no_overflow(b[0][3],
logvis*ficp->dmap[color_index0].color[3]);
466 bump_no_overflow(b[0][4], logvis*255.0);
467 #else
468 dbl_index0 = p[2] * cmap_size;
469 color_index0 = (int) (dbl_index0);
470
471 if (flam3_palette_mode_linear == fthp->cp.palette_mode) {
472 if (color_index0 < 0) {
473 color_index0 = 0;
474 dbl_frac = 0;
475 } else if (color_index0 >= cmap_size_m1) {
476 color_index0 = cmap_size_m1-1;
477 dbl_frac = 1.0;
478 } else {
479 /* interpolate between color_index0 and
color_index0+1 */
480 dbl_frac = dbl_index0 - (double)color_index0;
481 }
482
483 for (ci=0;ci<4;ci++) {
484 interpcolor[ci] = ficp->dmap[color_index0].color[ci]
* (1.0-dbl_frac) +
485
ficp->dmap[color_index0+1].color[ci] * dbl_frac;
486 }
487
488 } else { /* Palette mode step */
489
490 if (color_index0 < 0) {
491 color_index0 = 0;
492 } else if (color_index0 >= cmap_size_m1) {
493 color_index0 = cmap_size_m1;
494 }
495
496 for (ci=0;ci<4;ci++)
497 interpcolor[ci] = ficp->dmap[color_index0].color[ci];
498 }
499
500 if (p[3]==1.0) {
501 bump_no_overflow(b[0][0], interpcolor[0]);
502 bump_no_overflow(b[0][1], interpcolor[1]);
503 bump_no_overflow(b[0][2], interpcolor[2]);
504 bump_no_overflow(b[0][3], interpcolor[3]);
505 bump_no_overflow(b[0][4], 255.0);
506 } else {
507 bump_no_overflow(b[0][0], logvis*interpcolor[0]);
508 bump_no_overflow(b[0][1], logvis*interpcolor[1]);
509 bump_no_overflow(b[0][2], logvis*interpcolor[2]);
510 bump_no_overflow(b[0][3], logvis*interpcolor[3]);
511 bump_no_overflow(b[0][4], logvis*255.0);
512 }
513 #endif
514
515 }
516 }
517
518 #if defined(HAVE_LIBPTHREAD) && defined(USE_LOCKS)
519 /* Release mutex */
520 pthread_mutex_unlock(&ficp->bucket_mutex);
521 #endif
522
523 }
524 #ifdef HAVE_LIBPTHREAD
525 pthread_exit((void *)0);
526 #endif
527 }
(gdb) up
#1 0x00007fffaa36bad0 in iter_thread_float () at rect.c:253
253 static void iter_thread(void *fth) {
(gdb) bt
#0 iter_thread_int (fth=0x157681210) at rect.c:500
#1 0x00007fffaa36bad0 in iter_thread_float () at rect.c:253
#2 0x00007fffa9c9b010 in start_thread (arg=0x7fffa740f100) at
pthread_create.c:444
#3 0x00007fffa9d3e364 in .LY__clone () at
../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:107
(gdb) down
#0 iter_thread_int (fth=0x157681210) at rect.c:500
500 if (p[3]==1.0) {
(gdb) print p
$1 = (double *) 0x157703270
(gdb) print fthp->iter_storage[j]
$2 = 0.56417538618777463
(gdb) print &fthp->iter_storage[j]
$3 = (double *) 0x157703270
(gdb) print j
$4 = 0
(gdb) print p[0]
$5 = 0.56417538618777463
(gdb) print p[1]
$6 = 0.44645850976778223
(gdb) print p[2]
$7 = 0.66734460151419461
(gdb) print p[3]
$8 = 1
(gdb) display/i $pc
1: x/i $pc
=> 0x7fffaa36b444 <iter_thread_int+1604>: lwzx r5,r3,r7
(gdb) print/x $r5
$10 = 0x406fe00000000000
(gdb) print/x $r3
$11 = 0x1576a7b60
(gdb) print/x $r7
$12 = 0xfffffff600000000
(gdb) print &p[3]
$13 = (double *) 0x157703288
(gdb) print sizeof(pauset)
$14 = 16
(gdb) ptype /o pauset
/* offset | size */ type = struct timespec {
/* 0 | 8 */ __time_t tv_sec;
/* 8 | 8 */ __syscall_slong_t tv_nsec;
/* total size (bytes): 16 */
}
(gdb) print *environ@18
$17 = {0x7fffeb19f775 "SHELL=/bin/bash", 0x7fffeb19f785 "PWD=/home/benutzer",
0x7fffeb19f798 "LOGNAME=benutzer", 0x7fffeb19f7a9 "MOTD_SHOWN=pam",
0x7fffeb19f7b8 "HOME=/home/benutzer", 0x7fffeb19f7cc "LANG=de_DE.UTF-8",
0x7fffeb19f7dd
"LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01"...,
0x7fffeb19fef6 "SSH_CONNECTION=10.0.2.2 34038 10.0.2.15 22", 0x7fffeb19ff21
"TERM=xterm-256color", 0x7fffeb19ff35 "USER=benutzer", 0x7fffeb19ff43
"SHLVL=1", 0x7fffeb19ff4b "SSH_CLIENT=10.0.2.2 34038 22", 0x7fffeb19ff68
"PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games", 0x7fffeb19ffa6
"SSH_TTY=/dev/pts/2", 0x7fffeb19ffb9 "_=/usr/bin/env",
0x7fffeb19ffc8 "seed=3350",
0x7fffeb19ffd2 "issac_seed=4992",
0x0}