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

[perl #122868] crash in Perl_hv_common / S_share_hek_flags

Thread Previous
From:
perlbug-followup
Date:
September 30, 2014 23:22
Subject:
[perl #122868] crash in Perl_hv_common / S_share_hek_flags
Message ID:
rt-4.0.18-29382-1412036296-86.122868-75-0@perl.org
# New Ticket Created by   
# Please include the string:  [perl #122868]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=122868 >


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...


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl 5.20.0:

Configured by mg at Mon Sep 22 11:05:52 CEST 2014.

Summary of my perl5 (revision 5 version 20 subversion 0) configuration:
   
  Platform:
    osname=freebsd, osvers=10.0-release-p7, archname=amd64-freebsd-thread-multi
    uname='freebsd piglet.obligo.pl 10.0-release-p7 freebsd 10.0-release-p7 #2 r268534: sat jul 12 00:27:11 cest 2014 root@piglet.obligo.pl:usrobjusrsrcsyspiglet amd64 '
    config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.20/mach -Dprivlib=/usr/local/lib/perl5/5.20 -Dman3dir=/usr/local/lib/perl5/5.20/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.20/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.20 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.20/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.20/BSDPAN" -Doptimize=-O2 -pipe -O2 -pipe -g -march=native -fno-strict-aliasing -Ui_gdbm -Duse64bitint -Dusethreads=y -Dusemymalloc=n'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.20/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
    optimize='-O2 -pipe -O2 -pipe -g -march=native -fno-strict-aliasing',
    cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.20/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-pthread -Wl,-E  -fstack-protector -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib /usr/include/clang/3.3 /usr/lib
    libs=-lgdbm -lm -lcrypt -lutil
    perllibs=-lm -lcrypt -lutil
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.20/mach/CORE'
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib -fstack-protector'


---
@INC for perl 5.20.0:
    /usr/local/lib/perl5/5.20/BSDPAN
    /usr/local/lib/perl5/site_perl/5.20/mach
    /usr/local/lib/perl5/site_perl/5.20
    /usr/local/lib/perl5/5.20/mach
    /usr/local/lib/perl5/5.20
    .

---
Environment for perl 5.20.0:
    HOME=/root
    LANG (unset)
    LANGUAGE (unset)
    LC_COLLATE=pl_PL.UTF-8
    LC_CTYPE=pl_PL.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/games:/usr/kde/4/bin:/usr/lib/portage/bin:/root/bin
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/zsh


Thread Previous


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