Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 524 forks source link

assert(SvMAGICAL(sv)) for IO::File::open in multi-threaded prog #125

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

Migrated from rt.perl.org#929 (status was 'resolved')

Searchable as RT929$

p5pRT commented 24 years ago

From bl@incyte.com

I'm getting an error report of​:

  Assertion failed​: file "mg.c"\, line 52 at /usr/local/lib/perl5/5.00503/IP30-irix-thread/IO/File.pm line 164.

for a rather complex multi-threaded perl program.

Is there a known problem in this area?

I've been unable to reproduce the problem with a simple program. I'm willing to send the entire program I'm developing\, about 1700 lines currently (it's going to be released publicly anyway (if I get it to stay stable))\, but I'm pretty sure it's not anything I'm doing.

The program will run sometimes for hours before seeing this\, but it seems to always come up eventually. I've got the section of code that deals with 'FileHandle' wrapped in an eval\, so it's not stopping the program\, but I'd still like to be able to eliminate this problem.

Thoughts\, suggestions\, other useful info I can give?

thanks\, bl

p.s. I do read perl5-porters\, so you don't have to CC me to discussions there.

-- //====== Brett G. Lemoine -=- \bl@​incyte\.com ===============================\\ ||Sr. Systems Administrator| || ||Core Unix System Services| Managing systems administrators || || Incyte Pharmaceuticals | is alot like hearding cats. || || Palo Alto\, California | || |+-------------------------+-------------------------------------------------+| \\== PGP Key Fingerprint​: 68 A1 2A 2D 82 CE E9 70 5B 80 D1 11 EC F3 FB 85 ==//

Perl Info ``` Site configuration information for perl 5.00503: Configured by bl at Fri Jun 11 08:00:43 PDT 1999. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=irix, osvers=6.5, archname=IP30-irix-thread uname='irix64 blah 6.5 04151556 ip30 mips ' hint=recommended, useposix=true, d_sigaction=define usethreads=define useperlio=undef d_sfio=undef Compiler: cc='cc -n32', optimize='-g', gccversion= cppflags='-D_BSD_TYPES -D_BSD_TIME -OPT:Olimit=0:space=ON -DDEBUGGING -I/usr/local/include -I/usr/gnu/include -DLANGUAGE_C' ccflags ='-D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0:space=ON -DDEBUGGING -I/usr/local/include -I/usr/gnu/include -DLANGUAGE_C' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc -n32', ldflags =' -L/usr/local/lib32 -L/usr/local/lib -L/usr/gnu/lib' libpth=/usr/local/lib /usr/gnu/lib /usr/lib32 /lib32 /lib /usr/lib libs=-ldb -lm -lpthread libc=/usr/lib32/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-n32 -shared -L/usr/local/lib32 -L/usr/local/lib -L/usr/gnu/lib' Locally applied patches: @INC for perl 5.00503: /usr/local/lib/perl5/5.00503/IP30-irix-thread /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/IP30-irix-thread /usr/local/lib/perl5/site_perl/5.005 . Environment for perl 5.00503: HOME=/u/cuss/bl LANG= LANGUAGE (unset) LD_LIBRARY_PATH=/usr/X11/xview:/usr/local/lib:/usr/freeware/lib:/usr/sgitcl/lib:/u/cuss/bl/lib/sgi LOGDIR (unset) PATH=/usr/cdr/bin/SGI:/u/cuss/bl/bin:/u/cuss/bl/bin/irix:/usr/local/bin:/opt/MIPSpro/bin:/usr/freeware/bin:/usr/Cadmin/bin:/usr/Motif-1.2/bin:/usr/Motif-2.1/bin:/usr/OnRamp/bin:/usr/SGImeeting/bin:/usr/ToolTalk/bin:/usr/WebFace/bin:/usr/demos/bin:/usr/diags/bin:/usr/gnu/bin:/usr/java/bin:/usr/pcp/bin:/usr/pkg/bin:/usr/sgitcl/bin:/usr/ssm/bin:/usr/sysadm/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bsd:/bin/X11:/usr/etc:/etc:/usr/lib PERL_BADLANG (unset) SHELL=/bin/tcsh Complete configuration data for perl 5.00503: Author='' CONFIG='true' Date='$Date' Header='' Id='$Id' Locker='' Log='$Log' Mcc='Mcc' PATCHLEVEL='5' RCSfile='$RCSfile' Revision='$Revision' SUBVERSION='3' Source='' State='' _a='.a' _exe='' _o='.o' afs='false' alignbytes='8' ansi2knr='' aphostname='' apiversion='5.005' ar='ar' archlib='/usr/local/lib/perl5/5.00503/IP30-irix-thread' archlibexp='/usr/local/lib/perl5/5.00503/IP30-irix-thread' archname='IP30-irix-thread' archobjs='' awk='awk' baserev='5.0' bash='' bin='/usr/local/bin' binexp='/usr/local/bin' bison='' byacc='byacc' byteorder='4321' c='\c' castflags='0' cat='cat' cc='cc -n32' cccdlflags=' ' ccdlflags=' ' ccflags='-D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0:space=ON -DDEBUGGING -I/usr/local/include -I/usr/gnu/include -DLANGUAGE_C' ccsymbols='LANGUAGE_C=1 MIPSEB=1 _ABIN32=2 _COMPILER_VERSION=721 _LANGUAGE_C=1 _LONGLONG=1 _MIPS_FPSET=32 _MIPS_ISA=4 _MIPS_SIM=_ABIN32 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 _MODERN_C=1 _PIC=1 _SGI_SOURCE=1 _SVR4_SOURCE=1 __DSO__=1 __EXTENSIONS__=1 __INLINE_INTRINSICS=1 __MATH_HAS_NO_SIDE_EFFECTS=1 __host_mips=1 __mips=4 __sgi=1' cf_by='bl' cf_email='bl@incyte.com' cf_time='Fri Jun 11 08:00:43 PDT 1999' chgrp='' chmod='' chown='' clocktype='clock_t' comm='comm' compress='' config_arg0='./Configure' config_arg1='-Dusethreads' config_arg2='-Doptimize=-g' config_argc='2' config_args='-Dusethreads -Doptimize=-g' contains='grep' cp='cp' cpio='' cpp='cpp' cpp_stuff='42' cppccsymbols='_MIPSEB=1 _SYSTYPE_SVR4=1 __unix=1 host_mips=1 mips=1 sgi=1 unix=1' cppflags='-D_BSD_TYPES -D_BSD_TIME -OPT:Olimit=0:space=ON -DDEBUGGING -I/usr/local/include -I/usr/gnu/include -DLANGUAGE_C' cpplast='' cppminus='' cpprun='/usr/lib/cpp' cppstdin='cppstdin' cppsymbols='__STDC__=1 __mips=1' cryptlib='' csh='csh' d_Gconvert='gcvt((x),(n),(b))' d_access='define' d_alarm='define' d_archlib='define' d_attribut='' d_bcmp='define' d_bcopy='define' d_bsd='define' d_bsdgetpgrp='' d_bsdsetpgrp='' d_bzero='define' d_casti32='define' d_castneg='define' d_charvspr='' d_chown='define' d_chroot='define' d_chsize='' d_closedir='define' d_const='define' d_crypt='define' d_csh='define' d_cuserid='define' d_dbl_dig='define' d_difftime='define' d_dirnamlen='' d_dlerror='define' d_dlopen='define' d_dlsymun='' d_dosuid='' d_dup2='define' d_endgrent='define' d_endhent='define' d_endnent='define' d_endpent='define' d_endpwent='define' d_endsent='define' d_eofnblk='define' d_eunice='' d_fchmod='define' d_fchown='define' d_fcntl='define' d_fd_macros='define' d_fd_set='define' d_fds_bits='define' d_fgetpos='define' d_flexfnam='define' d_flock='define' d_fork='define' d_fpathconf='define' d_fsetpos='define' d_fstatfs='define' d_fstatvfs='define' d_ftime='' d_getgrent='define' d_getgrps='define' d_gethbyaddr='define' d_gethbyname='define' d_gethent='define' d_gethname='' d_gethostprotos='define' d_getlogin='define' d_getmntent='define' d_getnbyaddr='define' d_getnbyname='define' d_getnent='define' d_getnetprotos='define' d_getpbyname='define' d_getpbynumber='define' d_getpent='define' d_getpgid='define' d_getpgrp='define' d_getpgrp2='' d_getppid='define' d_getprior='define' d_getprotoprotos='define' d_getpwent='define' d_getsbyname='define' d_getsbyport='define' d_getsent='define' d_getservprotos='define' d_gettimeod='define' d_gnulibc='' d_grpasswd='define' d_hasmntopt='define' d_htonl='define' d_index='' d_inetaton='define' d_isascii='define' d_killpg='define' d_lchown='define' d_link='define' d_locconv='define' d_lockf='define' d_longdbl='define' d_longlong='define' d_lstat='define' d_mblen='define' d_mbstowcs='define' d_mbtowc='define' d_memcmp='define' d_memcpy='define' d_memmove='define' d_memset='define' d_mkdir='define' d_mkfifo='define' d_mktime='define' d_msg='define' d_msgctl='define' d_msgget='define' d_msgrcv='define' d_msgsnd='define' d_mymalloc='' d_nice='define' d_oldpthreads='' d_oldsock='' d_open3='define' d_pathconf='define' d_pause='define' d_phostname='' d_pipe='define' d_poll='define' d_portable='define' d_pthread_yield='' d_pthreads_created_joinable='define' d_pwage='define' d_pwchange='' d_pwclass='' d_pwcomment='define' d_pwexpire='' d_pwgecos='define' d_pwpasswd='define' d_pwquota='' d_readdir='define' d_readlink='define' d_rename='define' d_rewinddir='define' d_rmdir='define' d_safebcpy='define' d_safemcpy='define' d_sanemcmp='define' d_sched_yield='define' d_seekdir='define' d_select='define' d_sem='define' d_semctl='define' d_semctl_semid_ds='' d_semctl_semun='define' d_semget='define' d_semop='define' d_setegid='define' d_seteuid='define' d_setgrent='define' d_setgrps='define' d_sethent='define' d_setlinebuf='define' d_setlocale='define' d_setnent='define' d_setpent='define' d_setpgid='define' d_setpgrp='define' d_setpgrp2='' d_setprior='define' d_setpwent='define' d_setregid='define' d_setresgid='' d_setresuid='' d_setreuid='define' d_setrgid='define' d_setruid='define' d_setsent='define' d_setsid='define' d_setvbuf='define' d_sfio='' d_shm='define' d_shmat='define' d_shmatprototype='define' d_shmctl='define' d_shmdt='define' d_shmget='define' d_sigaction='define' d_sigsetjmp='define' d_socket='define' d_sockpair='define' d_statblks='define' d_statfsflags='' d_stdio_cnt_lval='define' d_stdio_ptr_lval='define' d_stdiobase='define' d_stdstdio='define' d_strchr='define' d_strcoll='define' d_strctcpy='define' d_strerrm='strerror(e)' d_strerror='define' d_strtod='define' d_strtol='define' d_strtoul='define' d_strxfrm='define' d_suidsafe='' d_symlink='define' d_syscall='define' d_sysconf='define' d_sysernlst='' d_syserrlst='define' d_system='define' d_tcgetpgrp='define' d_tcsetpgrp='define' d_telldir='define' d_time='define' d_times='define' d_truncate='define' d_tzname='define' d_umask='define' d_uname='define' d_union_semun='define' d_vfork='' d_void_closedir='' d_voidsig='define' d_voidtty='' d_volatile='define' d_vprintf='define' d_wait4='' d_waitpid='define' d_wcstombs='define' d_wctomb='define' d_xenix='' date='date' db_hashtype='u_int32_t' db_prefixtype='size_t' defvoidused='15' direntrytype='struct dirent' dlext='so' dlsrc='dl_dlopen.xs' doublesize='8' dynamic_ext='B DB_File Data/Dumper Fcntl IO IPC/SysV NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs re' eagain='EAGAIN' ebcdic='' echo='echo' egrep='egrep' emacs='' eunicefix=':' exe_ext='' expr='expr' extensions='B DB_File Data/Dumper Fcntl IO IPC/SysV NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs re Errno' find='find' firstmakefile='makefile' flex='' fpostype='fpos_t' freetype='void' full_ar='/bin/ar' full_csh='/sbin/csh' full_sed='/usr/freeware/bin/sed' gccversion='' gidtype='gid_t' glibpth='/usr/shlib /shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/local/lib ' grep='grep' groupcat='cat /etc/group' groupstype='gid_t' gzip='gzip' h_fcntl='false' h_sysfile='true' hint='recommended' hostcat='ypcat hosts' huge='' i_arpainet='define' i_bsdioctl='' i_db='define' i_dbm='define' i_dirent='define' i_dld='' i_dlfcn='define' i_fcntl='' i_float='define' i_gdbm='' i_grp='define' i_limits='define' i_locale='define' i_machcthreads='' i_malloc='define' i_math='define' i_memory='' i_mntent='define' i_ndbm='define' i_netdb='define' i_neterrno='' i_niin='define' i_pthread='define' i_pwd='define' i_rpcsvcdbm='' i_sfio='' i_sgtty='' i_stdarg='define' i_stddef='define' i_stdlib='define' i_string='define' i_sysdir='define' i_sysfile='define' i_sysfilio='define' i_sysin='' i_sysioctl='define' i_sysmount='define' i_sysndir='' i_sysparam='define' i_sysresrc='define' i_sysselct='define' i_syssockio='' i_sysstat='define' i_sysstatvfs='define' i_systime='define' i_systimek='' i_systimes='define' i_systypes='define' i_sysun='define' i_syswait='define' i_termio='' i_termios='define' i_time='' i_unistd='define' i_utime='define' i_values='define' i_varargs='' i_varhdr='stdarg.h' i_vfork='' ignore_versioned_solibs='' incpath='' inews='' installarchlib='/usr/local/lib/perl5/5.00503/IP30-irix-thread' installbin='/usr/local/bin' installman1dir='/usr/local/man/man1' installman3dir='/usr/local/lib/perl5/5.00503/man/man3' installprivlib='/usr/local/lib/perl5/5.00503' installscript='/usr/local/bin' installsitearch='/usr/local/lib/perl5/site_perl/5.005/IP30-irix-thread' installsitelib='/usr/local/lib/perl5/site_perl/5.005' installusrbinperl='' intsize='4' known_extensions='B DB_File Data/Dumper Fcntl GDBM_File IO IPC/SysV NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs re' ksh='' large='' ld='cc -n32' lddlflags='-n32 -shared -L/usr/local/lib32 -L/usr/local/lib -L/usr/gnu/lib' ldflags=' -L/usr/local/lib32 -L/usr/local/lib -L/usr/gnu/lib' less='less' lib_ext='.a' libc='/usr/lib32/libc.so' libperl='libperl.a' libpth='/usr/local/lib /usr/gnu/lib /usr/lib32 /lib32 /lib /usr/lib' libs='-ldb -lm -lpthread' libswanted='sfio inet nm ndbm gdbm dbm db dld ld m pthread cposix posix ndir dir ucb BSD x' line='line' lint='' lkflags='' ln='ln' lns='/usr/freeware/bin/ln -s' locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include' loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib' longdblsize='16' longlongsize='8' longsize='4' lp='' lpr='' ls='ls' lseektype='off_t' mail='' mailx='' make='make' make_set_make='#' malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"' mallocobj='' mallocsrc='' malloctype='void *' man1dir='/usr/local/man/man1' man1direxp='/usr/local/man/man1' man1ext='1' man3dir='/usr/local/lib/perl5/5.00503/man/man3' man3direxp='/usr/local/lib/perl5/5.00503/man/man3' man3ext='3' medium='' mips='' mips_type='System V' mkdir='mkdir' models='none' modetype='mode_t' more='more' mv='' myarchname='IP30-irix' mydomain='.incyte.com' myhostname='blah' myuname='irix64 blah 6.5 04151556 ip30 mips ' n='' netdb_hlen_type='int' netdb_host_type='const void *' netdb_name_type='const char *' netdb_net_type='in_addr_t' nm='nm' nm_opt='-p' nm_so_opt='-p' nonxs_ext='Errno' nroff='nroff' o_nonblock='O_NONBLOCK' obj_ext='.o' optimize='-g' orderlib='false' osname='irix' osvers='6.5' package='perl5' pager='/usr/freeware/bin/less' passcat='cat /etc/passwd' patchlevel='5' path_sep=':' perl='perl' perladmin='bl@incyte.com' perlpath='/usr/local/bin/perl' pg='pg' phostname='hostname' pidtype='pid_t' plibpth='/usr/lib32 /lib32 /usr/ccs/lib' pmake='' pp_ctl_cflags='' pr='' prefix='/usr/local' prefixexp='/usr/local' privlib='/usr/local/lib/perl5/5.00503' privlibexp='/usr/local/lib/perl5/5.00503' prototype='define' ptrsize='4' randbits='15' ranlib=':' rd_nodata='-1' rm='rm' rmail='' runnm='true' scriptdir='/usr/local/bin' scriptdirexp='/usr/local/bin' sed='sed' selectminbits='32' selecttype='fd_set *' sendmail='sendmail' sh='/bin/sh' shar='' sharpbang='#!' shmattype='void *' shortsize='2' shrpenv='' shsharp='true' sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ K32 CKPT RESTART UME NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 PTINTR PTRESCHED RTMIN NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 NUM63 RTMAX IOT CLD POLL ' sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "EMT", "FPE", "KILL", "BUS", "SEGV", "SYS", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "PWR", "WINCH", "URG", "IO", "STOP", "TSTP", "CONT", "TTIN", "TTOU", "VTALRM", "PROF", "XCPU", "XFSZ", "K32", "CKPT", "RESTART", "UME", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "PTINTR", "PTRESCHED", "RTMIN", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "NUM63", "RTMAX", "IOT", "CLD", "POLL", 0' sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 6 18 22 ' sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 18, 22, 0' signal_t='void' sitearch='/usr/local/lib/perl5/site_perl/5.005/IP30-irix-thread' sitearchexp='/usr/local/lib/perl5/site_perl/5.005/IP30-irix-thread' sitelib='/usr/local/lib/perl5/site_perl/5.005' sitelibexp='/usr/local/lib/perl5/site_perl/5.005' sizetype='size_t' sleep='' smail='' small='' so='so' sockethdr='' socketlib='' sort='sort' spackage='Perl5' spitshell='cat' split='' src='.' ssizetype='ssize_t' startperl='#!/usr/local/bin/perl' startsh='#!/bin/sh' static_ext=' ' stdchar='unsigned char' stdio_base='((fp)->_base)' stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' stdio_cnt='((fp)->_cnt)' stdio_filbuf='' stdio_ptr='((fp)->_ptr)' strings='/usr/include/string.h' submit='' subversion='3' sysman='/usr/local/man/man1' tail='' tar='' tbl='' tee='tee' test='test' timeincl='/usr/include/sys/time.h ' timetype='time_t' touch='touch' tr='tr' trnl='\n' troff='' uidtype='uid_t' uname='uname' uniq='uniq' usedl='define' usemymalloc='n' usenm='true' useopcode='true' useperlio='' useposix='true' usesfio='false' useshrplib='false' usethreads='define' usevfork='false' usrinc='/usr/include' uuname='' version='5.00503' vi='' voidflags='15' xlibpth='/usr/lib/386 /lib/386' zcat='' zip='zip' ```