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

Errors that call "noperl_die()" do exit(1) and the resulting error is not visible #287

Closed
dequis opened this Issue Sep 20, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@dequis
Member

dequis commented Sep 20, 2015

This was an installation issue but it seems like it would be really hard to figure out what happened here in normal situations.

I got mismatching library versions somehow (but definitely my fault), which perls handles with this:

5455                noperl_die("%s: loadable library and perl binaries are mismatched"
5456                           " (got handshake key %p, needed %p)\n",
5457                    file, got, need);

Which does fprintf to stderr, and calls exit(1), and that means running the atexit handlers such as term_deinit, which means the error is cleared from the screen.

So, without attaching a debugger breaking at exit somehow, I don't see the way a normal user could figure out what the error was.

Really long traceback:

Program received signal SIGKILL, Killed.
0x0000000070000018 in ?? ()
(gdb) bt
[...]
#9  0x00007f4c7cc0bfd5 in exit () from /usr/lib/libc.so.6
#10 0x00007f4c7e3854f2 in Perl_noperl_die (pat=0x7f4c7e41a2b0 "%s: loadable library and perl binaries are mismatched (got handshake key %p, needed %p)\n") at perlio.c:5233
#11 0x00007f4c7e19b8c5 in Perl_xs_handshake (key=229639143, v_my_perl=0x10e2600, file=0x7f4c7ba7f329 "Irssi.c") at util.c:5455
#12 0x00007f4c7ba79634 in boot_Irssi () from /usr/lib/perl5/vendor_perl/auto/Irssi/Irssi.so
#13 0x00007f4c7e1fb21f in Perl_pp_entersub (my_perl=0x10e2600) at pp_hot.c:3270
#14 0x00007f4c7e189127 in Perl_runops_debug (my_perl=0x10e2600) at dump.c:2234
#15 0x00007f4c7e081fb0 in Perl_call_sv (my_perl=0x10e2600, sv=0x11bcf28, flags=13) at perl.c:2755
#16 0x00007f4c7e08c53d in Perl_call_list (my_perl=0x10e2600, oldscope=8, paramList=0x11bccd0) at perl.c:4866
#17 0x00007f4c7e05de6a in S_process_special_blocks (my_perl=0x10e2600, floor=149, fullname=0x11184c8 "BEGIN", gv=0x11bcef8, cv=0x11bcf28) at op.c:8891
#18 0x00007f4c7e05d535 in Perl_newATTRSUB_x (my_perl=0x10e2600, floor=149, o=0x11cf2f0, proto=0x0, attrs=0x0, block=0x11cf2b0, o_is_gv=false) at op.c:8820
#19 0x00007f4c7e04bf2b in Perl_utilize (my_perl=0x10e2600, aver=1, floor=149, version=0x0, idop=0x11ccac8, arg=0x0) at op.c:6043
#20 0x00007f4c7e1035f8 in Perl_yyparse (my_perl=0x10e2600, gramtype=258) at perly.y:351
#21 0x00007f4c7e2cbcde in S_doeval (my_perl=0x10e2600, gimme=2, outside=0x1147030, seq=458, hh=0x0) at pp_ctl.c:3491
#22 0x00007f4c7e2d44db in Perl_pp_entereval (my_perl=0x10e2600) at pp_ctl.c:4302
#23 0x00007f4c7e189127 in Perl_runops_debug (my_perl=0x10e2600) at dump.c:2234
#24 0x00007f4c7e081fb0 in Perl_call_sv (my_perl=0x10e2600, sv=0x1147030, flags=14) at perl.c:2755
#25 0x00007f4c7e081621 in Perl_call_pv (my_perl=0x10e2600, sub_name=0x4b1bc1 "Irssi::Core::eval_data", flags=12) at perl.c:2634
#26 0x0000000000492ee9 in perl_script_eval (script=0x111b5f0) at perl-core.c:228
#27 script_load (name=<optimized out>, path=path@entry=0x0, data=<optimized out>) at perl-core.c:271
#28 0x00000000004937a3 in perl_script_load_data (data=<optimized out>) at perl-core.c:295
#29 0x0000000000499925 in cmd_script_exec (data=<optimized out>) at perl-fe.c:56
#30 0x000000000048bb32 in signal_emit_real (rec=rec@entry=0x112fc70, params=params@entry=3, va=va@entry=0x7fffadc0cdc8, first_hook=<optimized out>) at signals.c:242
#31 0x000000000048c04e in signal_emit (signal=signal@entry=0x11ca1e0 "command script exec", params=params@entry=3) at signals.c:286
#32 0x00000000004783b8 in command_runsub (cmd=0x4b29d3 "script", data=0x11ca22f "exec $^W=1; print for (Irssi::channels)[0]->nicks", server=0x0, item=0x0) at commands.c:329
#33 0x000000000048bb32 in signal_emit_real (rec=rec@entry=0x119f380, params=params@entry=3, va=va@entry=0x7fffadc0cf78, first_hook=<optimized out>) at signals.c:242
#34 0x000000000048c04e in signal_emit (signal=signal@entry=0x11ca490 "command script", params=params@entry=3) at signals.c:286
#35 0x0000000000477e39 in parse_command (item=0x0, server=0x0, expand_aliases=<optimized out>, command=0x11c02b1 "script exec $^W=1; print for (Irssi::channels)[0]->nicks") at commands.c:899
#36 event_command (line=0x11c02b1 "script exec $^W=1; print for (Irssi::channels)[0]->nicks", server=0x0, item=0x0) at commands.c:945
[...]

No idea what to do about this.

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Sep 20, 2015

don't see what we can realistically do here...

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Dec 9, 2015

I'll close this as CANTFIX for now, one thing to help other users is using the script utility to be more easily able to read screen content after it got cleared

@ailin-nemui ailin-nemui closed this Dec 9, 2015

@ailin-nemui ailin-nemui added the cantfix label Dec 9, 2015

@dequis

This comment has been minimized.

Member

dequis commented Dec 12, 2015

In case script doesn't help (it didn't for me), gdb oneliner if we ever find someone with issues like this:

gdb -ex 'b exit' -ex run irssi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment