nix icon indicating copy to clipboard operation
nix copied to clipboard

crash when evaluating module

Open teto opened this issue 5 years ago • 10 comments

I am trying to write some module that generates a (neo)vim config based on buildInputs (will create a proper python3Env etc). The crash happens when running this nix-shell : https://github.com/teto/mptcpanalyzer/blob/fda8ffb12976c3de31f537386b02eb9ded09ca9d/contrib/shell.nix with this nixpkgs (nixos-unstable plus my WIP patches): https://github.com/teto/nixpkgs/commit/a3b1357549b620d3d9b6d290d34d9615099a89ab

When I try to test it, nix crashes: nix (Nix) 2.2

I fear the backtrace might not be very helpful as is but I don't hae yet a good workflow on nixpkgs for gdb (any hint/tip appreciated):

           PID: 19542 (nix-shell)
           UID: 1000 (teto)
           GID: 100 (users)
        Signal: 11 (SEGV)
     Timestamp: Mon 2019-03-11 15:37:34 JST (37s ago)
  Command Line: nix-shell
    Executable: /nix/store/08i4l3pxx0z7ndrbbcwnbr2nxml6gh0r-nix-2.2/bin/nix
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (teto)
       Boot ID: 92207d172c3340d8a0f746b739a091ee
    Machine ID: 1aa845d7be064cb893633636b9b393d7
      Hostname: jedha
       Storage: /var/lib/systemd/coredump/core.nix-shell.1000.92207d172c3340d8a0f746b739a091ee.19542.1552286254000000.lz4 (truncated)
       Message: Process 19542 (nix-shell) of user 1000 dumped core.

GNU gdb (GDB) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /nix/store/08i4l3pxx0z7ndrbbcwnbr2nxml6gh0r-nix-2.2/bin/nix...(no debugging symbols found)...done.
BFD: warning: /var/tmp/coredump-F9asqf is truncated: expected core file size >= 4248256512, found: 2147483648

warning: core file may not match specified executable file.

warning: platform-specific solib_create_inferior_hook did not load initial shared libraries.
Cannot access memory at address 0x7f7eb36a40e8
Cannot access memory at address 0x7f7eb36a40e0
Failed to read a valid object file image from memory.
Core was generated by `nix-shell'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000436b38 in boost::io::basic_altstringbuf<char, std::char_traits<char>, std::allocator<char> >::overflow(int) ()
[Current thread is 1 (LWP 19542)]
+(gdb) bt
#0  0x0000000000436b38 in boost::io::basic_altstringbuf<char, std::char_traits<char>, std::allocator<char> >::overflow(int) ()
Backtrace stopped: Cannot access memory at address 0x7fff9beb59a8


teto avatar Mar 11 '19 06:03 teto