Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulumi: use autoPatchelfHook #81918

Closed
wants to merge 1 commit into from
Closed

Conversation

jonringer
Copy link
Contributor

Motivation for this change

follow up to: #81879

@dmeijboom could you validate it works, and if it doesn't can you post the command for the failing use case.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@dmeijboom
Copy link

Just tested it but unfortunately doesn't seem to work (running pulumi up in my python project):

Previewing update (dev):

error: failed to load language plugin python: could not read plugin [/home/dmeijboom/.nix-profile/bin/pulumi-language-python] stdout: EOF

Running pulumi-language-python throws a segfault (gdb output):

Starting program: /nix/store/0q9i1hfs3bbxgz0lz1qz9w0np3plj97g-user-environment/bin/pulumi-language-python 

Program received signal SIGSEGV, Segmentation fault.0x00007ffff7fd7aeb in dl_main () from /nix/store/dp9nhj3ng2hw3cfn0x0w867z0d3kp0i7-glibc-2.30/lib/ld-linux-x86-64.so.2

Would be nice if that can be fixed since your version is better 👍

@dmeijboom
Copy link

Valgrind output:

==9387== Memcheck, a memory error detector
==9387== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9387== Using Valgrind-3.15.0-608cb11914-20190413 and LibVEX; rerun with -h for copyright info
==9387== Command: /nix/store/0q9i1hfs3bbxgz0lz1qz9w0np3plj97g-user-environment/bin/pulumi-language-python
==9387== 
--9387-- Valgrind options:
--9387--    -v
--9387-- Contents of /proc/version:
--9387--   Linux version 5.5.7 (nixbld@localhost) (gcc version 9.2.0 (GCC)) #1-NixOS SMP Fri Feb 28 16:23:45 UTC 2020
--9387-- --9387-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand
--9387-- Page sizes: currently 4096, max supported 4096--9387-- Valgrind library directory: /nix/store/wxg1mhmd90s9krd9c6gkp53i7b70jn2j-valgrind-3.15.0/lib/valgrind
--9387-- Reading syms from /nix/store/99j82inxq3imn7yicwjawnavnircgh3r-pulumi-1.12.0/bin/pulumi-language-python--9387-- Reading syms from /nix/store/dp9nhj3ng2hw3cfn0x0w867z0d3kp0i7-glibc-2.30/lib/ld-2.30.so
--9387-- Reading syms from /nix/store/wxg1mhmd90s9krd9c6gkp53i7b70jn2j-valgrind-3.15.0/lib/valgrind/memcheck-amd64-linux
--9387--    object doesn't have a dynamic symbol table
--9387-- Scheduler: using generic scheduler lock implementation.
--9387-- Reading suppressions file: /nix/store/wxg1mhmd90s9krd9c6gkp53i7b70jn2j-valgrind-3.15.0/lib/valgrind/default.supp
==9387== embedded gdbserver: reading from /run/user/1000/vgdb-pipe-from-vgdb-to-9387-by-dmeijboom-on-???
==9387== embedded gdbserver: writing to   /run/user/1000/vgdb-pipe-to-vgdb-from-9387-by-dmeijboom-on-???
==9387== embedded gdbserver: shared mem   /run/user/1000/vgdb-pipe-shared-mem-vgdb-9387-by-dmeijboom-on-???
==9387== 
==9387== TO CONTROL THIS PROCESS USING vgdb (which you probably
==9387== don't want to do, unless you know exactly what you're doing,
==9387== or are doing some strange experiment):
==9387==   /nix/store/wxg1mhmd90s9krd9c6gkp53i7b70jn2j-valgrind-3.15.0/lib/valgrind/../../bin/vgdb --pid=9387 ...command...
==9387== 
==9387== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==9387==   /path/to/gdb /nix/store/0q9i1hfs3bbxgz0lz1qz9w0np3plj97g-user-environment/bin/pulumi-language-python
==9387== and then give GDB the following command
==9387==   target remote | /nix/store/wxg1mhmd90s9krd9c6gkp53i7b70jn2j-valgrind-3.15.0/lib/valgrind/../../bin/vgdb --pid=9387
==9387== --pid is optional if only one valgrind process is running
==9387== 
--9387-- REDIR: 0x401e360 (ld-linux-x86-64.so.2:strlen) redirected to 0x580bf112 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--9387-- REDIR: 0x401e140 (ld-linux-x86-64.so.2:index) redirected to 0x580bf12c (vgPlain_amd64_linux_REDIR_FOR_index)
==9387== 
==9387== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==9387==  Bad permissions for mapped region at address 0x400318
==9387==    at 0x4003AEB: dl_main (in /nix/store/dp9nhj3ng2hw3cfn0x0w867z0d3kp0i7-glibc-2.30/lib/ld-2.30.so)
==9387==    by 0x40185AE: _dl_sysdep_start (in /nix/store/dp9nhj3ng2hw3cfn0x0w867z0d3kp0i7-glibc-2.30/lib/ld-2.30.so)
==9387==    by 0x4001F15: _dl_start (in /nix/store/dp9nhj3ng2hw3cfn0x0w867z0d3kp0i7-glibc-2.30/lib/ld-2.30.so)
==9387==    by 0x4001097: ??? (in /nix/store/dp9nhj3ng2hw3cfn0x0w867z0d3kp0i7-glibc-2.30/lib/ld-2.30.so)
==9387== 
==9387== HEAP SUMMARY:
==9387==     in use at exit: 0 bytes in 0 blocks
==9387==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==9387== 
==9387== All heap blocks were freed -- no leaks are possible
==9387== 
==9387== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

@jonringer
Copy link
Contributor Author

this is beyond my nix wizardry :(

@jonringer jonringer closed this Mar 9, 2020
@jonringer jonringer deleted the cleanup-pulumi branch March 9, 2020 00:49
@jonringer
Copy link
Contributor Author

@dmeijboom thank you for your time/effort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants