Re: [RTnet-developers] bug: log file isn't written
Brought to you by:
bet-frogger,
kiszka
|
From: Jan K. <jan...@we...> - 2007-08-07 08:39:08
|
Karl Reichert wrote:
> Jan Kiszka wrote:
>> Karl Reichert wrote:
>>> Jan Kiszka wrote:
>>>> Karl Reichert wrote:
>>>>> Jan Kiszka wrote:
>>>>>> Karl Reichert wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> found sth, looks like a bug: When using 'tdmacfg rteth0 slot 0 10=
0
>> -s
>>>>>> 100 -l rtnet.log' I do not get any logfile.
>>>>>>
>>>>>> Everything is possible given that this features was never intensiv=
ely
>>>>>> used AFAIK (at least by myself). I do remember it once worked - ri=
ght
>>>>>> after I implemented it.
>>>>>>
>>>>>> Just to double-check: That tdmacfg command is the first one issued=
>>>> after
>>>>>> "tdmacfg rteth0 master/slave", isn't it?
>>>>>>
>>>>>> Jan
>>>>>>
>>>>> Yes it is. Searched whole / for rtnet.log, nothing is there. But fr=
om
>> a
>>>> quick look at sourcecode of tdmacfg I can't find any reason why it
>> doesn't
>>>> works.
>>>>
>>>> [It's a shame, but I'm lacking a test environment...]
>>>> Please collect an "strace" dump of the related tdmacfg run. Let's se=
e
>> if
>>>> that already gives some hints. Next step would then be gdb/ddd.
>>>>
>>>> Jan
>>>>
>>> Hi Jan,
>>>
>>> See below for strace log. Seems like it doesn't even tries to open a
>> file:
>>>
>>>
>>> root@rtnet:/usr/local/rtnet/sbin# strace ./tdmacfg rteth0 slot 0 100 =
-s
>> 100 -l rtnet.log
>>> execve("./tdmacfg", ["./tdmacfg", "rteth0", "slot", "0", "100", "-s",=
>> "100", "-l", "rtnet.log"], [/* 34 vars */]) =3D 0
>>> brk(0) =3D 0x804b000
>>> access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file o=
r
>> directory)
>>> mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1=
,
>> 0) =3D 0xb7f85000
>>> access("/etc/ld.so.preload", R_OK) =3D -1 ENOENT (No such file o=
r
>> directory)
>>> open("/etc/ld.so.cache", O_RDONLY) =3D 3
>>> fstat64(3, {st_mode=3DS_IFREG|0644, st_size=3D34837, ...}) =3D 0
>>> mmap2(NULL, 34837, PROT_READ, MAP_PRIVATE, 3, 0) =3D 0xb7f7c000
>>> close(3) =3D 0
>>> access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file o=
r
>> directory)
>>> open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) =3D 3
>>> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0`\1\000"...=
,
>> 512) =3D 512
>>> fstat64(3, {st_mode=3DS_IFREG|0644, st_size=3D1307104, ...}) =3D 0
>>> mmap2(NULL, 1312164, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, =
3,
>> 0) =3D 0xb7e3b000
>>> mmap2(0xb7f76000, 12288, PROT_READ|PROT_WRITE,
>> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13b) =3D 0xb7f76000
>>> mmap2(0xb7f79000, 9636, PROT_READ|PROT_WRITE,
>> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =3D 0xb7f79000
>>> close(3) =3D 0
>>> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1=
,
>> 0) =3D 0xb7e3a000
>>> set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e3a6c0,
>> limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pag=
es:1,
>> seg_not_present:0, useable:1}) =3D 0
>>> mprotect(0xb7f76000, 4096, PROT_READ) =3D 0
>>> munmap(0xb7f7c000, 34837) =3D 0
>>> open("/dev/rtnet", O_RDWR) =3D 3
>>> ioctl(3, NCP_IOC_GETMOUNTUID, 0x804a760) =3D 0
>> This is TDMA_IOC_CAL_RESULT_SIZE, the command to calculate the expecte=
d
>> size of the log file. It returns 0, and that can only mean that TDMA
>> considers the addressed Ethernet device as already calibrated. Possibl=
e
>> reasons:
>> - some "slot" command was already issued on the device
>> - device is configured as (primary) master
>=20
> Bingo, that's the case. I run '/usr/local/rtnet/sbin/tdmacfg rteth0 mas=
ter 10000 -i 1' before ...
>=20
> But still I don't get it: with above command I just start the master, t=
o assign a send slot, I also have to assign a slot. Can't I get a log for=
this?
Nope, because the primary master doesn't calibrate itself - usually.
Against which master should it do so? It only goes through calibration
if it is restarting after a failure and there is currently a backup
master running in the network.
Jan
|