Tcl Source Code

View Ticket
Login
Ticket UUID: 576158
Title: Unkown floating-pointer errno=4
Type: Bug Version: obsolete: 8.3.3
Submitter: s_a_white Created on: 2002-07-01 21:38:54
Subsystem: 07. Variables Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Open Last Modified: 2004-03-29 16:10:32
Resolution: None Closed By:
    Closed on:
Description:
The above error message is obtained spuriously when performing floating point calculations, which are 
being performed in event executed scripts.  The problem dosen't appear in the same piece of TCL code 
and may be related to CPU load / event frequency related.

Tracing this further, with minor testing it would appear likely that strtod under some circumstance(s) can 
return EINTR.  This problem was found on Mandrake 8.1/8.2 and RedHat 7.2 using various 2.4 provided 
kernels and gcc 2.96 and 3.1.0.
User Comments: dkf added on 2004-03-29 16:10:32:
Logged In: YES 
user_id=79902

No idea.  strtod() should never generate EINTR as it doesn't
use syscalls (or if it does as part of loading some kind of
l10n configuration, it should trap everything inside itself
and do an appropriate fallback.)

Dropping onto Jeff as he has a bit more experience with
diagnosing problems resulting from intricate (mis)configuration.

msofer added on 2004-03-27 04:03:25:
Logged In: YES 
user_id=148712

Oh boy, long neglected thing :(
Donal: would you know what to do with this?

msofer added on 2003-02-19 23:16:13:

File Added - 42867: bug_test.tgz

Logged In: YES 
user_id=148712

Bug confirmed with the code provided (now attached to this
report).

If strtod returns EINTR, that would be a glibc bug. It is a
good question if we can work around it ...

s_a_white added on 2002-07-03 04:24:41:
Logged In: YES 
user_id=59929

> Oohh ... threads! You wouldn't be accessing the same tcl
> interpreter from different OS threads by any chance? 

As you can see from the example it dosen't.  In the case of our real program then no.  No thread accesses the 
interpreter directly.  All threads requiring to talk to TCL use a FIFO style device that can handle the threading.  
Some code has been written for tcl so it will treat the device as just another event source.

msofer added on 2002-07-03 04:10:29:
Logged In: YES 
user_id=148712

Sorry Zoran; didn mean to assign this to you yet - until I'm
confident it has to do with threading. You're welcome to
pop-in though :)

msofer added on 2002-07-03 04:08:07:
Logged In: YES 
user_id=148712

Oohh ... threads! You wouldn't be accessing the same tcl
interpreter from different OS threads by any chance?

s_a_white added on 2002-07-03 03:47:46:
Logged In: YES 
user_id=59929

Some test code can be found here:

http://sidplay2.sourceforge.net/bug_test.tgz

Run ./build.sh and then wish test1.tcl.  Hold down the "a" key and you should see it print out the word hi.  
Normally holding down the key for about 30 secs will do it (on my Athlon 700), but the length of time it takes is not 
constant.

msofer added on 2002-07-02 04:43:26:
Logged In: YES 
user_id=148712

Could you provide a scriptlet that produces the error?

Attachments: