Skip to content

Instantly share code, notes, and snippets.

@Xliff
Last active September 12, 2016 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xliff/a835c15ae283e33c484cf5d7b2b4ebc2 to your computer and use it in GitHub Desktop.
Save Xliff/a835c15ae283e33c484cf5d7b2b4ebc2 to your computer and use it in GitHub Desktop.

[SOLVED] -- Update Inline::Perl5

This crash comes from the embryonic project here:

https://github.com/Xliff/p6-webservice-eveonline

If I run the following command from the source root:

$ perl6 -Ilib --stagestats bin/priceFit.pl6 --s

I get the following output:

Stage start      :   0.000
Stage parse      :   3.793
Stage syntaxcheck:   0.000
Stage ast        :   0.000
Stage optimize   :   0.016
Stage mast       :   0.047
Stage mbc        :   0.001
Stage moar       :   0.000
Hash %fit = {"1400mm Howitzer Artillery II" => 7, "Garde II" => "4", "Large Anti-EM Screen Reinforcer I" => 1, "Large Projectile Burst Aerator II" => 1, "Large Remote Shield Booster II" => 1, "Light Shield Maintenance Bot I" => "5", "Nanite Repair Paste" => "666", "Pithum C-Type Adaptive Invulnerability Field" => 1, "Republic Fleet EMP L" => "9400", "Republic Fleet Gyrostabilizer" => 4, "Republic Fleet Titanium Sabot L" => "4227", "Sensor Booster II" => 2, "Tracking Computer II" => 2, "Tracking Enhancer II" => 2, "True Sansha Reactor Control Unit" => 1, :_BYID_(${"14130" => ${:count(1), :name("True Sansha Reactor Control Unit")}, "15806" => ${:count(4), :name("Republic Fleet Gyrostabilizer")}, "1952" => ${:count(2), :name("Sensor Booster II")}, "1978" => ${:count(2), :name("Tracking Computer II")}, "1999" => ${:count(2), :name("Tracking Enhancer II")}, "21894" => ${:count("9400"), :name("Republic Fleet EMP L")}, "21935" => ${:count("4227"), :name("Republic Fleet Titanium Sabot L")}, "23719" => ${:count("5"), :name("Light Shield Maintenance Bot I")}, "26076" => ${:count(1), :name("Large Anti-EM Screen Reinforcer I")}, "26430" => ${:count(1), :name("Large Projectile Burst Aerator II")}, "28211" => ${:count("4"), :name("Garde II")}, "28668" => ${:count("666"), :name("Nanite Repair Paste")}, "2961" => ${:count(7), :name("1400mm Howitzer Artillery II")}, "3608" => ${:count(1), :name("Large Remote Shield Booster II")}, "4349" => ${:count(1), :name("Pithum C-Type Adaptive Invulnerability Field")}})}
Retrieving Data for item 'Tracking Computer II'
Req: http://api.eve-central.com/api/quicklook?typeid=1978
Unrecognized switch: --s  (-h will show valid options).
Segmentation fault

Which is odd, because if I run this command, the SEGV goes away:

$ perl6 -Ilib --stagestats bin/priceFit.pl6

So why is it that it looks like the call to retrieveMarketData() looks like it's jumping back into my implicitly defined MAIN()? If I explicitly define, the SEGV reappears.

Now for the gory details:

$ perl6 --version
This is Rakudo version 2016.07.1-225-g5f2818b built on MoarVM version 2016.07-17-g40948f6
implementing Perl 6.c.

For those interested, here is a backtrace:

#0  0xb56e496e in Perl_sv_replace ()
   from /usr/lib/i386-linux-gnu/libperl.so.5.22
#1  0xb5702e5e in Perl_leave_scope ()
   from /usr/lib/i386-linux-gnu/libperl.so.5.22
#2  0xb5628e3d in ?? () from /usr/lib/i386-linux-gnu/libperl.so.5.22
#3  0xb5640a97 in Perl_newATTRSUB_x ()
   from /usr/lib/i386-linux-gnu/libperl.so.5.22
#4  0xb564479a in Perl_utilize () from /usr/lib/i386-linux-gnu/libperl.so.5.22
#5  0xb5678b75 in Perl_yyparse () from /usr/lib/i386-linux-gnu/libperl.so.5.22
#6  0xb5707485 in ?? () from /usr/lib/i386-linux-gnu/libperl.so.5.22
#7  0xb57133a9 in Perl_pp_entereval ()
   from /usr/lib/i386-linux-gnu/libperl.so.5.22
#8  0xb5648990 in Perl_eval_sv () from /usr/lib/i386-linux-gnu/libperl.so.5.22
#9  0xb5648ac0 in Perl_eval_pv () from /usr/lib/i386-linux-gnu/libperl.so.5.22
#10 0xb5b66c2c in p5_eval_pv (my_perl=0x119e0838,
    p=0xb3c4880 "use strict;\nuse warnings;\n\npackage Perl6::Object;\n\nuse overload '\"\"' => sub {\n    my ($self) = @_;\n\n    return $self->Str;\n};\n\nour $AUTOLOAD;\nsub AUTOLOAD {\n    my ($self) = @_;\n    my $name = $AUTOLO"...,
    croak_on_error=0) at p5helper.c:254
#11 0xb7db3023 in dcCall_x86_cdecl ()
   from //home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so
#12 0xb7db29ca in dc_callvm_call_x86_cdecl ()
   from //home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so
#13 0xb7db268a in dcCallPointer ()
   from //home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so
#14 0xb7d0b25e in MVM_nativecall_invoke (tc=<optimized out>,
    res_type=<optimized out>, site=<optimized out>, args=<optimized out>)
    at src/core/nativecall_dyncall.c:584
#15 0xb7ce242d in MVM_interp_run (tc=0x804b448,
    initial_invoke=0xb7daeea0 <toplevel_initial_invoke>, invoke_data=0x80b33a8)
    at src/core/interp.c:3955
#16 0xb7dafa37 in MVM_vm_run_file (instance=0x804b008,
    filename=0xbffff6ad "/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm") at src/moar.c:304
#17 0x08048c61 in main (argc=<optimized out>, argv=<optimized out>)
    at src/main.c:191

And the MVM_dump_backtrace:

(gdb) call MVM_dump_backtrace(tc)
   at <unknown>:1  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/precomp/F45CE097478697B8DB23E48D2FC484119859EF1F.1471596614.4145/24/24DD121B5B4774C04A7084827BFAD92199756E03:CALL-ME)
 from gen/moar/m-BOOTSTRAP.nqp:2877  (/home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/BOOTSTRAP.moarvm:)
 from site#sources/3B0B691884D053BE76F42DB8F36C3421FCE9FB4C (Inline::Perl5):427  (/home/cbwood/projects/p6-webservice-eveonline/lib/.precomp/F45CE097478697B8DB23E48D2FC484119859EF1F.1471596614.4145/3B/3B0B691884D053BE76F42DB8F36C3421FCE9FB4C:run)
 from site#sources/3B0B691884D053BE76F42DB8F36C3421FCE9FB4C (Inline::Perl5):560  (/home/cbwood/projects/p6-webservice-eveonline/lib/.precomp/F45CE097478697B8DB23E48D2FC484119859EF1F.1471596614.4145/3B/3B0B691884D053BE76F42DB8F36C3421FCE9FB4C:init_callbacks)
 from site#sources/3B0B691884D053BE76F42DB8F36C3421FCE9FB4C (Inline::Perl5):960  (/home/cbwood/projects/p6-webservice-eveonline/lib/.precomp/F45CE097478697B8DB23E48D2FC484119859EF1F.1471596614.4145/3B/3B0B691884D053BE76F42DB8F36C3421FCE9FB4C:BUILD)
 from gen/moar/m-CORE.setting:1054  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:BUILDALL)
 from gen/moar/m-CORE.setting:1030  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:BUILDALL)
 from gen/moar/m-CORE.setting:1026  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:bless)
 from gen/moar/m-CORE.setting:1013  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:new)
 from <unknown>:1  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:new)
 from /home/cbwood/projects/p6-webservice-eveonline/lib/WebService/EveOnline/Base.pm6 (WebService::EveOnline::Base):136  (/home/cbwood/projects/p6-webservice-eveonline/lib/.precomp/F45CE097478697B8DB23E48D2FC484119859EF1F.1471596614.4145/33/33F3BCB7995573BCBC944E84D8F7426CA172DF9A:handleResponse)
 from /home/cbwood/projects/p6-webservice-eveonline/lib/WebService/EveOnline/Base.pm6 (WebService::EveOnline::Base):249  (/home/cbwood/projects/p6-webservice-eveonline/lib/.precomp/F45CE097478697B8DB23E48D2FC484119859EF1F.1471596614.4145/33/33F3BCB7995573BCBC944E84D8F7426CA172DF9A:makeRequest)
 from /home/cbwood/projects/p6-webservice-eveonline/lib/WebService/EveOnline/EveCentral.pm6 (WebService::EveOnline::EveCentral):122  (/home/cbwood/projects/p6-webservice-eveonline/lib/.precomp/F45CE097478697B8DB23E48D2FC484119859EF1F.1471596614.4145/C9/C9ACCDE48BFE29FA6A5752D1C6CB7600F39211A1:quickLook)
 from bin/priceFit.pl6:92  (<ephemeral file>:)
 from gen/moar/m-CORE.setting:4869  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:)
 from gen/moar/m-CORE.setting:4855  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:sink-all)
 from gen/moar/m-CORE.setting:14566  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:sink)
 from bin/priceFit.pl6:90  (<ephemeral file>:retrieveMarketData)
 from bin/priceFit.pl6:115  (<ephemeral file>:<unit>)
 from bin/priceFit.pl6:1  (<ephemeral file>:<unit-outer>)
 from gen/moar/stage2/NQPHLL.nqp:1519  (/home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:eval)
 from gen/moar/stage2/NQPHLL.nqp:1722  (/home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)
 from gen/moar/stage2/NQPHLL.nqp:1616  (/home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
 from src/Perl6/Compiler.nqp:27  (/home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval)
 from gen/moar/stage2/NQPHLL.nqp:1590  (/home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_line)
 from gen/moar/m-main.nqp:47  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:MAIN)
 from gen/moar/m-main.nqp:38  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<mainline>)
 from <unknown>:1  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<main>)
 from <unknown>:1  (/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<entry>)

More as it is discovered.

@Xliff
Copy link
Author

Xliff commented Aug 19, 2016

Updating Inline::Perl5 eliminated the problem. Wheee

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