Dear pyowfs users,
i just found out that pyowfs is not working for owfs versions > 2.7p29.
when using p30 or p32 (p31 not tested) pyowfs terminates with a
segfault. p28 and p29 are tested and working ok.
paul, have you changed anything libowcapi related - i didnt find
anything in owcapi.h ?!?!
however here is the debug output of OW_get from p30 and p29 both with
same parameters talking to a owserver instance running on localhost
p...@mexx-desktop:~/work/projects/pyowfs$ export
LD_LIBRARY_PATH=/home/pr/tmp/owfs_p30/lib
p...@mexx-desktop:~/work/projects/pyowfs$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> buf_p = ctypes.POINTER (ctypes.c_char) ()
>>> buf_len = ctypes.c_long ()
>>> path="/81.7F9221000000/type"
>>> import pyowfs
>>> c = pyowfs.Connection ("127.0.0.1:4711")
>>> c.capi.libcapi.OW_set_error_level ("6")
6
>>> c.capi.libcapi.OW_set_error_print ("2")
2
>>> c.capi.libcapi.OW_get (path, ctypes.byref (buf_p), ctypes.byref (buf_len))
DEBUG: ow_parseobject.c:OWQ_create(70) /81.7F9221000000/type
CALL: ow_parsename.c:FS_ParsedName_anywhere(97) path=[/81.7F9221000000/type]
DEBUG: ow_cache.c:Cache_Get_Device(862) 81 7F 92 21 00 00 00 DD
DEBUG: ow_cache.c:Cache_Get_Common(1092) Get from cache sn 81 7F 92 21 00 00
00 DD pointer=0x1abc94 index=0 size=4
DEBUG: ow_cache.c:Cache_Get_Common(1128) value not found in cache
DETAIL: ow_presence.c:CheckPresence(80) Checking presence of
/81.7F9221000000/type
CALL: ow_server.c:ServerPresence(178) SERVER(0) path=/81.7F9221000000/type
DEBUG: ow_server.c:ToServer(657) path=/81.7F9221000000/type
DEBUG: ow_server.c:ToServer(685) version=0 payload=22 size=0 type=6 SG=105
offset=0
Writev byte buffer ionr=1/2 length=24
--000: 00 00 00 00 00 00 00 16 00 00 00 06 00 00 01 05
--016: 00 00 00 00 00 00 00 00
<........................>
Writev byte buffer ionr=2/2 length=22
--000: 2F 38 31 2E 37 46 39 32 32 31 30 30 30 30 30 30
--016: 2F 74 79 70 65 00
</81.7F9221000000/type.>
DEBUG: ow_tcp_read.c:tcp_read(61) attempt 24 bytes Time:(2,0)n
Byte buffer NETREAD, length=24
--000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 05
--016: 00 00 00 00 00 00 00 00
<........................>
DEBUG: ow_tcp_read.c:tcp_read(109) n=24 nleft=0 n-nleft=24
DEBUG: ow_presence.c:CheckThisConnection(223) Presence found on server bus
127.0.0.1:4711
DEBUG: ow_cache.c:Cache_Add_Device(478) 81 7F 92 21 00 00 00 DD bus=0
DEBUG: ow_cache.c:Cache_Add_Common(597) Add to cache sn 81 7F 92 21 00 00 00
DD pointer=0x1abc94 index=0 size=4
DEBUG: ow_read.c:FS_read_postparse(79) /81.7F9221000000/type
DEBUG: ow_read.c:FS_read_distribute(197) /81.7F9221000000/type
DEBUG: ow_read.c:FS_r_given_bus(230) structure contents before the read is
performed
OWQ OneWireQuery structure of /81.7F9221000000/type
OneWireQuery size=32 offset=0, extension=0
Byte buffer OneWireQuery buffer, length=32
--000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
--016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<................................>
Cleanup = BFAD7DDE OneWireQuery I=0 U=0 F=-2.95933E-41 Y=0 D=Thu Jan 1
01:00:00 1970
--- OneWireQuery done
DEBUG: ow_read.c:FS_r_given_bus(236) pid=-1215916352 call ServerRead
CALL: ow_server.c:ServerRead(141) SERVER(0) path=/81.7F9221000000/type
DEBUG: ow_server.c:ToServer(657) path=/81.7F9221000000/type
DEBUG: ow_server.c:ToServer(685) version=0 payload=22 size=32 type=2 SG=105
offset=0
Writev byte buffer ionr=1/2 length=24
--000: 00 00 00 00 00 00 00 16 00 00 00 02 00 00 01 05
--016: 00 00 00 20 00 00 00 00
<................... ....>
Writev byte buffer ionr=2/2 length=22
--000: 2F 38 31 2E 37 46 39 32 32 31 30 30 30 30 30 30
--016: 2F 74 79 70 65 00
</81.7F9221000000/type.>
DEBUG: ow_tcp_read.c:tcp_read(61) attempt 24 bytes Time:(2,0)n
Byte buffer NETREAD, length=24
--000: 00 00 00 00 00 00 00 06 00 00 00 06 00 00 01 05
--016: 00 00 00 06 00 00 00 00
<........................>
DEBUG: ow_tcp_read.c:tcp_read(109) n=24 nleft=0 n-nleft=24
DEBUG: ow_tcp_read.c:tcp_read(61) attempt 6 bytes Time:(2,0)n
Byte buffer NETREAD, length=6
--000: 44 53 31 34 32 30
<DS1420>
DEBUG: ow_tcp_read.c:tcp_read(109) n=6 nleft=0 n-nleft=6
DEBUG: ow_read.c:FS_r_given_bus(240) back from server
DEBUG: ow_read.c:FS_r_given_bus(257) After read is performed (status 6)
OWQ OneWireQuery structure of /81.7F9221000000/type
OneWireQuery size=32 offset=0, extension=0
Byte buffer OneWireQuery buffer, length=32
--000: 44 53 31 34 32 30 00 00 00 00 00 00 00 00 00 00
--016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<DS1420..........................>
Cleanup = BFAD7DDE OneWireQuery I=0 U=0 F=-2.95933E-41 Y=0 D=Thu Jan 1
01:00:00 1970
--- OneWireQuery done
DEBUG: ow_read.c:FS_read_distribute(219) /81.7F9221000000/type return 6
DEBUG: ow_read.c:FS_read_postparse(98) /81.7F9221000000/type return 6
Segmentation fault
and from p28 - same call which works ...
p...@mexx-desktop:~/work/projects/pyowfs$ export
LD_LIBRARY_PATH=/home/pr/tmp/owfs_p28/lib
p...@mexx-desktop:~/work/projects/pyowfs$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> buf_p = ctypes.POINTER (ctypes.c_char) ()
>>> buf_len = ctypes.c_long ()
>>> path="/81.7F9221000000/type"
>>> import pyowfs
>>> c = pyowfs.Connection ("127.0.0.1:4711")
>>> c.capi.libcapi.OW_set_error_level ("6")
6
>>> c.capi.libcapi.OW_set_error_print ("2")
2
>>> c.capi.libcapi.OW_get (path, ctypes.byref (buf_p), ctypes.byref (buf_len))
DEBUG: ow_parseobject.c:FS_OWQ_create(26) /81.7F9221000000/type
CALL: ow_parsename.c:FS_ParsedName_anywhere(115) path=[/81.7F9221000000/type]
DEBUG: ow_cache.c:Cache_Get_Device(858) 81 7F 92 21 00 00 00 DD
DEBUG: ow_cache.c:Cache_Get_Common(1088) Get from cache sn 81 7F 92 21 00 00
00 DD pointer=0x3c6814 index=0 size=4
DEBUG: ow_cache.c:Cache_Get_Common(1124) value not found in cache
DETAIL: ow_presence.c:CheckPresence(80) Checking presence of
/81.7F9221000000/type
CALL: ow_server.c:ServerPresence(178) SERVER(0) path=/81.7F9221000000/type
DEBUG: ow_server.c:ToServer(657) path=/81.7F9221000000/type
DEBUG: ow_server.c:ToServer(686) version=0 payload=22 size=0 type=6 SG=105
offset=0
Writev byte buffer ionr=1/2 length=24
--000: 00 00 00 00 00 00 00 16 00 00 00 06 00 00 01 05
--016: 00 00 00 00 00 00 00 00
<........................>
Writev byte buffer ionr=2/2 length=22
--000: 2F 38 31 2E 37 46 39 32 32 31 30 30 30 30 30 30
--016: 2F 74 79 70 65 00
</81.7F9221000000/type.>
DEBUG: ow_tcp_read.c:tcp_read(61) attempt 24 bytes Time:(2,0)
Byte buffer NETREAD, length=24
--000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 05
--016: 00 00 00 00 00 00 00 00
<........................>
DEBUG: ow_tcp_read.c:tcp_read(109) n=24 nleft=0 n-nleft=24
DEBUG: ow_presence.c:CheckThisConnection(227) Presence found on server bus
127.0.0.1:4711
DEBUG: ow_cache.c:Cache_Add_Device(476) 81 7F 92 21 00 00 00 DD bus=0
DEBUG: ow_cache.c:Cache_Add_Common(595) Add to cache sn 81 7F 92 21 00 00 00
DD pointer=0x3c6814 index=0 size=4
DEBUG: ow_read.c:FS_read_postparse(78) /81.7F9221000000/type
DEBUG: ow_read.c:FS_read_distribute(196) /81.7F9221000000/type
DEBUG: ow_read.c:FS_r_given_bus(229) start
OWQ OneWireQuery structure of /81.7F9221000000/type
OneWireQuery size=32 offset=0, extension=0
Byte buffer OneWireQuery buffer, length=32
--000: D0 23 25 00 D0 23 25 00 54 41 52 59 3D 43 3B 4C
--016: 43 5F 4D 45 53 53 41 47 45 53 3D 43 3B 4C 43 5F
<.#%..#%.TARY=C;LC_MESSAGES=C;LC_>
OneWireQuery I=0 U=0 F=-2.44814E-41 Y=0 D=Thu Jan 1 01:00:00 1970
--- OneWireQuery done
DEBUG: ow_read.c:FS_r_given_bus(235) pid=-1216149824 call ServerRead
CALL: ow_server.c:ServerRead(141) SERVER(0) path=/81.7F9221000000/type
DEBUG: ow_server.c:ToServer(657) path=/81.7F9221000000/type
DEBUG: ow_server.c:ToServer(686) version=0 payload=22 size=32 type=2 SG=105
offset=0
Writev byte buffer ionr=1/2 length=24
--000: 00 00 00 00 00 00 00 16 00 00 00 02 00 00 01 05
--016: 00 00 00 20 00 00 00 00
<................... ....>
Writev byte buffer ionr=2/2 length=22
--000: 2F 38 31 2E 37 46 39 32 32 31 30 30 30 30 30 30
--016: 2F 74 79 70 65 00
</81.7F9221000000/type.>
DEBUG: ow_tcp_read.c:tcp_read(61) attempt 24 bytes Time:(2,0)
Byte buffer NETREAD, length=24
--000: 00 00 00 00 00 00 00 06 00 00 00 06 00 00 01 05
--016: 00 00 00 06 00 00 00 00
<........................>
DEBUG: ow_tcp_read.c:tcp_read(109) n=24 nleft=0 n-nleft=24
DEBUG: ow_tcp_read.c:tcp_read(61) attempt 6 bytes Time:(2,0)
Byte buffer NETREAD, length=6
--000: 44 53 31 34 32 30
<DS1420>
DEBUG: ow_tcp_read.c:tcp_read(109) n=6 nleft=0 n-nleft=6
DEBUG: ow_read.c:FS_r_given_bus(239) back from server
OWQ OneWireQuery structure of /81.7F9221000000/type
OneWireQuery size=32 offset=0, extension=0
Byte buffer OneWireQuery buffer, length=32
--000: 44 53 31 34 32 30 25 00 54 41 52 59 3D 43 3B 4C
--016: 43 5F 4D 45 53 53 41 47 45 53 3D 43 3B 4C 43 5F
<DS1420%.TARY=C;LC_MESSAGES=C;LC_>
OneWireQuery I=0 U=0 F=-2.44814E-41 Y=0 D=Thu Jan 1 01:00:00 1970
--- OneWireQuery done
DEBUG: ow_read.c:FS_r_given_bus(256) return 6
DEBUG: ow_read.c:FS_read_distribute(218) /81.7F9221000000/type return 6
DEBUG: ow_read.c:FS_read_postparse(97) /81.7F9221000000/type return 6
DEBUG: ow_parseobject.c:FS_OWQ_destroy(163) /81.7F9221000000/type
DEBUG: ow_parsename.c:FS_ParsedName_destroy(64) /81.7F9221000000/type
6
as i am really stuck ... i am going to ask you for any hints regarding
this issue ...
the owdir ... etc tools all work perfectly - and as i am using only
calls of libowcapi ... i am really lost with this behaviour ... ?!?!
so any help please ...
for easier diffing of the outputs i have put it on pastebin :
p30: http://pastebin.org/118513
p28: http://pastebin.org/118514
thanks a lot,
marcus.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers