Bug 92195 - Perl extension hangs on file I/O
Perl extension hangs on file I/O
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
9
All Linux
high Severity high
: ---
: ---
Assigned To: Jason Vas Dias
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-03 15:15 EDT by John Sintilas
Modified: 2005-11-11 19:59 EST (History)
0 users

See Also:
Fixed In Version: ALL
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-11 19:59:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description John Sintilas 2003-06-03 15:15:06 EDT
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 15:16:43 EDT
Created attachment 92121 [details]
Test code to reproduce error
Comment 2 John Sintilas 2003-06-04 13:20:40 EDT
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 16:07:54 EDT
Correction to step 1, -DGNU_SOURCE should actually be -D_GNU_SOURCE. Sorry for 
any confusion. 
Comment 4 Jason Vas Dias 2005-11-11 19:59:11 EST
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.