Bizarre segmentation fault building fgl
Please select a template from the list above.
While testing GHC %9.0.1 rc1 I noticed a reproducible segmentation while compiling fgl-5.7.0.0
:
Core was generated by `/nix/store/g6c91jky4m457rmb96nqyn11lhmdpgnh-ghc-9.0.0.20201227/lib/ghc-9.0.0.20'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f0b92d2ae06 in getcpu ()
[Current thread is 1 (Thread 0x7f0b8a37d740 (LWP 23238))]
>>> bt
#0 0x00007f0b92d2ae06 in getcpu ()
#1 0x00007f0b7c15cea7 in _dl_vdso_vsym () from /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6
#2 0x00007f0b7c0e4337 in time_ifunc () from /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6
#3 0x00007f0b92d38373 in elf_machine_rela (skip_ifunc=0, reloc_addr_arg=0x7f0b7c1e6d20 <*ABS*@got.plt>, version=<optimized out>, sym=<optimized out>, reloc=0x7f0b7c04f1e8, map=0x2162c70) at ../sysdeps/x86_64/dl-machine.h:516
#4 elf_dynamic_do_Rela (skip_ifunc=0, lazy=<optimized out>, nrelative=<optimized out>, relsize=<optimized out>, reladdr=<optimized out>, map=0x2162c70) at do-rel.h:149
#5 _dl_relocate_object (scope=<optimized out>, reloc_mode=reloc_mode@entry=1, consider_profiling=<optimized out>, consider_profiling@entry=0) at dl-reloc.c:255
#6 0x00007f0b92d3f82e in dl_open_worker (a=a@entry=0x7fffb1b4e1c0) at dl-open.c:688
#7 0x00007f0b8a5f5b65 in __GI__dl_catch_exception (exception=exception@entry=0x7fffb1b4e1a0, operate=operate@entry=0x7f0b92d3f5d0 <dl_open_worker>, args=args@entry=0x7fffb1b4e1c0) at dl-error-skeleton.c:208
#8 0x00007f0b92d3f20a in _dl_open (file=0x7fffb1b4e468 "/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6", mode=-2147483647, caller_dlopen=0x7f0b8aa0928b <internal_dlopen+43>, nsid=<optimized out>, argc=84, argv=<optimized out>, env=0x7fffb1b52e50) at dl-open.c:837
#9 0x00007f0b8a74c246 in dlopen_doit (a=a@entry=0x7fffb1b4e3e0) at dlopen.c:66
#10 0x00007f0b8a5f5b65 in __GI__dl_catch_exception (exception=exception@entry=0x7fffb1b4e380, operate=operate@entry=0x7f0b8a74c1f0 <dlopen_doit>, args=args@entry=0x7fffb1b4e3e0) at dl-error-skeleton.c:208
#11 0x00007f0b8a5f5bff in __GI__dl_catch_error (objname=objname@entry=0x2145eb0, errstring=errstring@entry=0x2145eb8, mallocedp=mallocedp@entry=0x2145ea8, operate=operate@entry=0x7f0b8a74c1f0 <dlopen_doit>, args=args@entry=0x7fffb1b4e3e0) at dl-error-skeleton.c:227
#12 0x00007f0b8a74c8f5 in _dlerror_run (operate=operate@entry=0x7f0b8a74c1f0 <dlopen_doit>, args=args@entry=0x7fffb1b4e3e0) at dlerror.c:170
#13 0x00007f0b8a74c2c6 in __dlopen (file=file@entry=0x7fffb1b4e468 "/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6", mode=mode@entry=1) at dlopen.c:87
#14 0x00007f0b8aa0928b in internal_dlopen (dll_name=0x7fffb1b4e468 "/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6") at rts/Linker.c:582
#15 0x00007f0b8aa09b57 in addDLL (dll_name=<optimized out>) at rts/Linker.c:736
#16 0x00007f0b8d435e87 in ghcizm9zi0zi0zi20201227_GHCiziObjLink_czuaddDLL_info () from /nix/store/g6c91jky4m457rmb96nqyn11lhmdpgnh-ghc-9.0.0.20201227/lib/ghc-9.0.0.20201227/bin/../ghci-9.0.0.20201227/libHSghci-9.0.0.20201227-ghc9.0.0.20201227.so
#17 0x0000000000000000 in ?? ()
>>> thread apply all bt
Thread 5 (Thread 0x7f0b777fe700 (LWP 23267)):
#0 futex_wait_cancelable (private=0, expected=0, futex_word=0x2100428) at ../sysdeps/nptl/futex-internal.h:183
#1 __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x2100430, cond=cond@entry=0x2100400) at pthread_cond_wait.c:508
#2 __pthread_cond_wait (cond=cond@entry=0x2100400, mutex=mutex@entry=0x2100430) at pthread_cond_wait.c:638
#3 0x00007f0b8aa3b5c9 in waitCondition (pCond=pCond@entry=0x2100400, pMut=pMut@entry=0x2100430) at rts/posix/OSThreads.c:117
#4 0x00007f0b8aa1563b in waitForWorkerCapability (task=<optimized out>) at rts/Capability.c:706
#5 yieldCapability (pCap=pCap@entry=0x7f0b777fde88, task=task@entry=0x21003f0, gcAllowed=gcAllowed@entry=true) at rts/Capability.c:999
#6 0x00007f0b8aa11f23 in scheduleYield (task=0x21003f0, pcap=0x7f0b777fde80) at rts/Schedule.c:721
#7 schedule (initialCapability=initialCapability@entry=0x7f0b8aa6cbc0 <MainCapability>, task=task@entry=0x21003f0) at rts/Schedule.c:317
#8 0x00007f0b8aa1326c in scheduleWorker (cap=cap@entry=0x7f0b8aa6cbc0 <MainCapability>, task=task@entry=0x21003f0) at rts/Schedule.c:2670
#9 0x00007f0b8aa1cf58 in workerStart (task=0x21003f0) at rts/Task.c:446
#10 0x00007f0b8a731ead in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007f0b8a5bed2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 4 (Thread 0x7f0b7d1ee700 (LWP 23264)):
#0 __libc_read (nbytes=8, buf=0x7f0b7d1edeb8, fd=7) at ../sysdeps/unix/sysv/linux/read.c:26
#1 __libc_read (fd=fd@entry=7, buf=buf@entry=0x7f0b7d1edeb8, nbytes=nbytes@entry=8) at ../sysdeps/unix/sysv/linux/read.c:24
#2 0x00007f0b8aa3b9be in itimer_thread_func (_handle_tick=0x7f0b8aa23110 <handle_tick>) at rts/posix/itimer/Pthread.c:127
#3 0x00007f0b8a731ead in start_thread (arg=<optimized out>) at pthread_create.c:477
#4 0x00007f0b8a5bed2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 3 (Thread 0x7f0b77fff700 (LWP 23266)):
#0 0x00007f0b8a5b4dd9 in __GI___poll (fds=0x42001067b0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007f0b8ba0f0a4 in ?? () from /nix/store/g6c91jky4m457rmb96nqyn11lhmdpgnh-ghc-9.0.0.20201227/lib/ghc-9.0.0.20201227/bin/../base-4.15.0.0/libHSbase-4.15.0.0-ghc9.0.0.20201227.so
#2 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f0b7c9ed700 (LWP 23265)):
#0 0x00007f0b8a5bf04f in epoll_wait (epfd=6, events=0x4200106010, maxevents=64, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x00007f0b8b9fb4d5 in base_GHCziEventziEPoll_new10_info () from /nix/store/g6c91jky4m457rmb96nqyn11lhmdpgnh-ghc-9.0.0.20201227/lib/ghc-9.0.0.20201227/bin/../base-4.15.0.0/libHSbase-4.15.0.0-ghc9.0.0.20201227.so
#2 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f0b8a37d740 (LWP 23238)):
#0 0x00007f0b92d2ae06 in getcpu ()
#1 0x00007f0b7c15cea7 in _dl_vdso_vsym () from /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6
#2 0x00007f0b7c0e4337 in time_ifunc () from /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6
#3 0x00007f0b92d38373 in elf_machine_rela (skip_ifunc=0, reloc_addr_arg=0x7f0b7c1e6d20 <*ABS*@got.plt>, version=<optimized out>, sym=<optimized out>, reloc=0x7f0b7c04f1e8, map=0x2162c70) at ../sysdeps/x86_64/dl-machine.h:516
#4 elf_dynamic_do_Rela (skip_ifunc=0, lazy=<optimized out>, nrelative=<optimized out>, relsize=<optimized out>, reladdr=<optimized out>, map=0x2162c70) at do-rel.h:149
#5 _dl_relocate_object (scope=<optimized out>, reloc_mode=reloc_mode@entry=1, consider_profiling=<optimized out>, consider_profiling@entry=0) at dl-reloc.c:255
#6 0x00007f0b92d3f82e in dl_open_worker (a=a@entry=0x7fffb1b4e1c0) at dl-open.c:688
#7 0x00007f0b8a5f5b65 in __GI__dl_catch_exception (exception=exception@entry=0x7fffb1b4e1a0, operate=operate@entry=0x7f0b92d3f5d0 <dl_open_worker>, args=args@entry=0x7fffb1b4e1c0) at dl-error-skeleton.c:208
#8 0x00007f0b92d3f20a in _dl_open (file=0x7fffb1b4e468 "/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6", mode=-2147483647, caller_dlopen=0x7f0b8aa0928b <internal_dlopen+43>, nsid=<optimized out>, argc=84, argv=<optimized out>, env=0x7fffb1b52e50) at dl-open.c:837
#9 0x00007f0b8a74c246 in dlopen_doit (a=a@entry=0x7fffb1b4e3e0) at dlopen.c:66
#10 0x00007f0b8a5f5b65 in __GI__dl_catch_exception (exception=exception@entry=0x7fffb1b4e380, operate=operate@entry=0x7f0b8a74c1f0 <dlopen_doit>, args=args@entry=0x7fffb1b4e3e0) at dl-error-skeleton.c:208
#11 0x00007f0b8a5f5bff in __GI__dl_catch_error (objname=objname@entry=0x2145eb0, errstring=errstring@entry=0x2145eb8, mallocedp=mallocedp@entry=0x2145ea8, operate=operate@entry=0x7f0b8a74c1f0 <dlopen_doit>, args=args@entry=0x7fffb1b4e3e0) at dl-error-skeleton.c:227
#12 0x00007f0b8a74c8f5 in _dlerror_run (operate=operate@entry=0x7f0b8a74c1f0 <dlopen_doit>, args=args@entry=0x7fffb1b4e3e0) at dlerror.c:170
#13 0x00007f0b8a74c2c6 in __dlopen (file=file@entry=0x7fffb1b4e468 "/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6", mode=mode@entry=1) at dlopen.c:87
#14 0x00007f0b8aa0928b in internal_dlopen (dll_name=0x7fffb1b4e468 "/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6") at rts/Linker.c:582
#15 0x00007f0b8aa09b57 in addDLL (dll_name=<optimized out>) at rts/Linker.c:736
#16 0x00007f0b8d435e87 in ghcizm9zi0zi0zi20201227_GHCiziObjLink_czuaddDLL_info () from /nix/store/g6c91jky4m457rmb96nqyn11lhmdpgnh-ghc-9.0.0.20201227/lib/ghc-9.0.0.20201227/bin/../ghci-9.0.0.20201227/libHSghci-9.0.0.20201227-ghc9.0.0.20201227.so
#17 0x0000000000000000 in ?? ()
>>>
Given that GHC it's crashing in glibc
's DVSO, I somewhat doubt that this is GHC's fault.