Bug#1067907: flam3-utils: flam3-genome randomly segfaults on ppc64el

2024-04-19 Thread Peter Blackman

On 13/04/2024 10:45, Bernhard Übelacker wrote:

Hi Bernard,

Many thanks for looking at this, but I'm afraid I still can't see any 
obvious solution.




(gdb) bt
#0  iter_thread_int (fth=0x157681210) at rect.c:500


The failing instruction is

  500 if (p[3]==1.0) {

I assume the issue is with p[3] rather than 1.0,
but the gbd dump shows p[3] holding a valid value!

  (gdb) print p[3]
  $8 = 1


If anyone with access to hardware was minded to have a further look,
it might be interesting to see if the program works without optimisation,
or maybe with just -O1   (set in Makefile.am)


Kind Regards,
Peter



Bug#1067907: flam3-utils: flam3-genome randomly segfaults on ppc64el

2024-04-13 Thread Bernhard Übelacker

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  0x7fffaa36bad0 in iter_thread_float () at rect.c:253
#2  0x7fffa9c9b010 in start_thread (arg=0x7fffa740f100) at 
pthread_create.c:444
#3  0x7fffa9d3e364 in .LY__clone () at 
../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:107
(gdb)

More details in attached file.

Kind regards,
Bernhardhttps://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
TIMEPID  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.171299873800.zst
 (present)
  Size on Disk: 1.8M
   Message: Process 819 (flam3-genome) of user 1001 dumped core.

Stack trace of thread 1051:
#0  0x7fffaa36b444 n/a (libflam3.so.0 + 0x2b444)
#1  0x7fffaa36bad0 n/a (libflam3.so.0 + 0x2bad0)
#2  0x7fffa9c9b010 n/a (libc.so.6 + 0x9b010)
#3  0x7fffa9d3e364 __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  0x7fffaa36b444 in ?? () from /lib/powerpc64-linux-gnu/libflam3.so.0
[Current thread is 1 (Thread 0x7fffa740f100 (LWP 1051))]
(gdb) bt
#0  0x7fffaa36b444 in ?? () from /lib/powerpc64-linux-gnu/libflam3.so.0
#1  0x7fffaa36bad0 in ?? () from /lib/powerpc64-linux-gnu/libflam3.so.0
#2  0x7fffa9c9b010 in start_thread (arg=0x7fffa740f100) at 
pthread_create.c:444
#3  0x7fffa9d3e364 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  0x7fffaa36bad0 in iter_thread_float () at rect.c:253
#2  0x7fffa9c9b010 in start_thread (arg=0x7fffa740f100) at 
pthread_create.c:444
#3  0x7fffa9d3e364 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) {
254double sub_batch;
255int j;
256flam3_thread_helper *fthp = (flam3_thread_helper *)fth;
257flam3_iter_constants *ficp = fthp->fic;
258struct timespec pauset;
259int SBS = ficp->spec->sub_batch_size;
260int fuse;
261int cmap_size = ficp->cmap_size;
262int cmap_size_m1 = ficp->cmap_size-1;
263
264double eta = 0.0;

Bug#1067907: flam3-utils: flam3-genome randomly segfaults on ppc64el

2024-03-28 Thread Peter Blackman

Package: flam3-utils
Version: 3.1.1+ds2-2+b1
Severity: normal
X-Debbugs-Cc: pe...@pblackman.plus.com
User: debian-powe...@lists.debian.org
Usertags: ppc64el


Dear Maintainer,

flam3-genome randomly segfaults on ppc64el, but runs OK on all other
architectures.

See
https://ci.debian.net/packages/f/flam3/testing/ppc64el/
segfaults maybe one run in five.

See also
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001667