Bug 92195 - Perl extension hangs on file I/O
Summary: Perl extension hangs on file I/O
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl
Version: 9
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-03 19:15 UTC by John Sintilas
Modified: 2005-11-12 00:59 UTC (History)
0 users

Fixed In Version: ALL
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-12 00:59:11 UTC
Embargoed:


Attachments (Terms of Use)
Test code to reproduce error (5.92 KB, application/x-zip-compressed)
2003-06-03 19:16 UTC, John Sintilas
no flags Details

Description John Sintilas 2003-06-03 19:15:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET 
CLR 1.0.3705)

Description of problem:
When working with files(opening, reading, seeking, closing) from within a Perl 
C extension, the program will hang during one of the file operations, usually a 
fseek. I haven't tested this on RedHat 8 yet, but previous versions of RedHat 
prior to that all work with this code on perl v5.8.0. I have condensed the C 
code and perl script to the bare minimum to reproduce the error. My 
installation of RH9 is a complete install, all available packages are already 
installed. 

Version-Release number of selected component (if applicable):
5.8.0

How reproducible:
Always

Steps to Reproduce:
1. After unzipping the files, compile the C code using the following command: 
    gcc -O -c -I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE *.c

The path following -I is where your perl.h,EXTERN.h,and XSUB.h files should be 
located by default. The CAtest_wrap.c file may give errors for crypt.h, if that 
happens use this instead: 
    gcc -O -DGNU_SOURCE -c -I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE 
*.c

2. Link the objects into CAtest.so using the command:
    ld -G -o CAtest.so *.o
3. Run the perl script test_4CA.pl 
    

Actual Results:  Hangs after displaying "Ok after read".

Expected Results:  The program should complete after the "Ok after read" 
message and should return control of the shell to the user. 

Additional info:

I have noticed that running the perl script with MALLOC_CHECK set seems to 
alleviate the hanging, but using that isn't an option on the client end and 
would probably degrade performance significantly. You can test this by typing 
MALLOC_CHECK_=1 perl test_4CA.pl

Comment 1 John Sintilas 2003-06-03 19:16:43 UTC
Created attachment 92121 [details]
Test code to reproduce error

Comment 2 John Sintilas 2003-06-04 17:20:40 UTC
I just tested the same code on a clean install of RedHat 8.0 and it runs with 
no problems, so this is definitely a version 9 issue.

Comment 3 John Sintilas 2003-06-04 20:07:54 UTC
Correction to step 1, -DGNU_SOURCE should actually be -D_GNU_SOURCE. Sorry for 
any confusion. 

Comment 4 Jason Vas Dias 2005-11-12 00:59:11 UTC
Sorry this bug seems to have been overlooked.
This bug is not a problem with any current Red Hat perl releases.


Note You need to log in before you can comment on or make changes to this bug.