develooper Front page | perl.perl5.porters | Postings from October 2014

[perl #122868] crash in Perl_hv_common / S_share_hek_flags

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
October 1, 2014 00:13
Subject:
[perl #122868] crash in Perl_hv_common / S_share_hek_flags
Message ID:
rt-4.0.18-12863-1412122374-468.122868-15-0@perl.org
On Mon Sep 29 17:18:16 2014, mg@fork.pl wrote:
> This is a bug report for perl from mg@fork.pl,
> generated with the help of perlbug 1.40 running under perl 5.20.0.
> 
> 
> -----------------------------------------------------------------
> We have perl based web application. It crashes with segv several times
> a day.
> So it's not easily repeatable (as the creash happens 1 in 100K http
> requests served).
>  I have perl 5.20 build with symbols and can provide any gdb stuff
> needed - but
> I cannot provide you with coredump as it contains sensitive data
> (that's production
> environment).
> 
> Stacktrace looks like this:
> 
> #0  0x00000008008de137 in S_share_hek_flags (my_perl=0x801c19e00,
> str=0x815d59660 "COUNT", len=5, hash=1160607206, flags=1024) at
> hv.c:2872
> 2872            if (HeHASH(entry) != hash)              /* strings
> can't be equal */
> [New Thread 801c06400 (LWP 100627/perl)]
> (gdb) bt
> #0  0x00000008008de137 in S_share_hek_flags (my_perl=0x801c19e00,
> str=0x815d59660 "COUNT", len=5, hash=1160607206, flags=1024) at
> hv.c:2872
>  #1  0x00000008008df1e6 in Perl_hv_common (my_perl=0x801c19e00,
> hv=0x816814390, keysv=<value optimized out>, key=0x815d59660 "COUNT",
> klen=5, flags=<value optimized out>,
>     action=<value optimized out>, val=0x8167ea0f0, hash=<value
> optimized out>) at hv.c:782
> #2  0x00000008009146f9 in Perl_pp_hslice (my_perl=0x801c19e00) at
> pp.c:4770
> #3  0x00000008008e5456 in Perl_runops_standard (my_perl=0x801c19e00)
> at run.c:42
> #4  0x000000080086ef49 in perl_run (my_perl=0x801c19e00) at
> perl.c:2456
> #5  0x0000000000400eda in main ()
> 
> 
> #0  0x00000008008de137 in S_share_hek_flags (my_perl=0x801c19e00,
> str=0x816727f30 "cdr", len=3, hash=2934883949, flags=258) at hv.c:2872
> 2872            if (HeHASH(entry) != hash)              /* strings
> can't be equal */
> [New Thread 801c06400 (LWP 102604/perl)]
> (gdb) bt
> #0  0x00000008008de137 in S_share_hek_flags (my_perl=0x801c19e00,
> str=0x816727f30 "cdr", len=3, hash=2934883949, flags=258) at hv.c:2872
>  #1  0x00000008008df1e6 in Perl_hv_common (my_perl=0x801c19e00,
> hv=0x816afc9d8, keysv=<value optimized out>, key=0x816727f30 "cdr",
> klen=3, flags=<value optimized out>,
>     action=<value optimized out>, val=0x816add810, hash=<value
> optimized out>) at hv.c:782
> #2  0x00000008008e9bd5 in Perl_pp_helem (my_perl=0x801c19e00) at
> pp_hot.c:1769
> #3  0x00000008008e5456 in Perl_runops_standard (my_perl=0x801c19e00)
> at run.c:42
> #4  0x000000080086ef49 in perl_run (my_perl=0x801c19e00) at
> perl.c:2456
> #5  0x0000000000400eda in main ()
> 
> 
> entry seems to be broken
> 
> (gdb) p *entry
> $10 = {hent_next = 0x67007100726463, hent_hek = 0x594152002f, he_valu
> = {hent_val = 0x480038312e30, hent_refcount = 79165779947056}}
> 
> but I don't know much about hash entry internals...

That’s not much to go by.  Could you at least show us the line of Perl code on which it’s crashing, or maybe even the containing function?  This should give you the file and line number:

(gdb) p Perl_warn(my_perl, "")

Also, it may help you to reduce the test case if you get a Perl backtrace:

(gdb) p Perl_eval_pv(my_perl,"use Carp; Carp::cluck 'foo'",0)

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=122868

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About