Issue1822

classification
Title: Problem with os.stat on SunOS 5.10 / x86
Type: behaviour Severity: critical
Components: Library Versions: Jython 2.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amak, fwierzbicki, ked, pjenvey
Priority: normal Keywords:

Created on 2011-11-22.08:28:01 by ked, last changed 2013-02-25.21:46:33 by ked.

Messages
msg6730 (view) Author: (ked) Date: 2011-11-22.08:28:01
os.stat returns wrong inode number, device, number of hard links, ids and size on SunOS 5.10 / x86 (it works well with SunOS 5.10 / sparc)

Example :

>>> platform.platform()
'Java-1.5.0_22-Java_HotSpot-TM-_Server_VM,_1.5.0_22-b03,_Sun_Microsystems_Inc.-on-SunOS-5.10-x86'
>>> os.stat('foo')
(33206, 0L, -1L, -1, -1, -1, 0L, 1321949534, 1321949534, 1321949538)


>>> platform.platform()
'Java-1.5.0_24-Java_HotSpot-TM-_Server_VM,_1.5.0_24-b02,_Sun_Microsystems_Inc.-on-SunOS-5.10-sparc'
>>> os.stat('foo')
(33206, 192086L, 93585416L, 1, 24960, 1002, 0L, 1321949534, 1321949534, 1321949534)
msg7000 (view) Author: Alan Kennedy (amak) Date: 2012-03-31.19:51:35
What is the output of the following code on the system where this bug appears?

>>> import sys
>>> sys.builtin_module_names
msg7019 (view) Author: (ked) Date: 2012-04-02.07:10:08
>>> import sys
>>> sys.builtin_module_names
('zipimport', 'jffi', '_py_compile', 'time', 'imp', '_collections', 'struct', '_sre', 'gc', 'cStringIO', 'math', '__builtin__', '_functools', 'cPickle', 'exceptions', '_systemrestart', '_marshal', 'jarray', 'errno', '_weakref', 'ucnhash', '_random', '_ast', 'binascii', 'operator', '_hashlib', 'thread', '_threading', 'array', 'posix', 'sys', 'synchronize', 'itertools', '_codecs', 'cmath', '_csv')
msg7022 (view) Author: Alan Kennedy (amak) Date: 2012-04-03.18:12:39
This functionality comes from jnr-posix, the jar file for which does not have a version number, although commit logs shows that we're using version 1.1.4.

Since the latest version of jnr-posix is 1.1.8, we should probably update our version of that jar as a first step.

It is unclear to me if we need to also update the related jffi*.jar files as well.

Adding pjenvey to seek advice.
msg7023 (view) Author: Philip Jenvey (pjenvey) Date: 2012-04-03.18:14:13
Yea, you usually do. You might want to just copy them from JRuby, they usually have the latest (and all of these files in one place)
msg7024 (view) Author: Alan Kennedy (amak) Date: 2012-04-03.18:37:44
How good are our tests for this stuff?

Is it something we want to do for 2.5.3?

Or defer until 2.7?
msg7065 (view) Author: Alan Kennedy (amak) Date: 2012-04-17.22:32:00
The latest JNR libs have been added to the 2.7 branch.

Please can you try out the code on HG tip and see if that solves the problem?

If it does, we can consider updating to the latest on the 2.5 branch as well.
msg7758 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-25.21:03:01
Since there hasn't been a reply for almost a year I guess we can close. Probably the new posix jar will fix these.
msg7762 (view) Author: (ked) Date: 2013-02-25.21:46:33
Sorry, I cannot test this anymore. You can close the issue, thank you
History
Date User Action Args
2013-02-25 21:46:33kedsetmessages: + msg7762
2013-02-25 21:03:01fwierzbickisetstatus: open -> closed
versions: + Jython 2.5, - 2.5.2
nosy: + fwierzbicki
messages: + msg7758
priority: normal
resolution: out of date
2012-04-17 22:32:00amaksetmessages: + msg7065
2012-04-03 18:37:44amaksetmessages: + msg7024
2012-04-03 18:14:13pjenveysetmessages: + msg7023
2012-04-03 18:12:40amaksetnosy: + pjenvey
messages: + msg7022
2012-04-02 07:10:08kedsetmessages: + msg7019
2012-03-31 19:51:35amaksetnosy: + amak
messages: + msg7000
2011-11-22 08:28:02kedcreate