• 20.07.2025, 01:49
  • Register
  • Login
  • You are not logged in.

 

JinTu

Full Member

Tuesday, August 13th 2013, 5:31pm


I have prototyped the alternate approach in my sandbox (commit a104b34be9290dee691529ce6dee08a8ff87fcc8). I need to give it some more testing though since I did manage to hang my devel box a few times as I was tweaking things. I must admit, this is the most fragility I have seen with stuff running in user space on Linux for a long time and I have been a Linux hacker since kernel 0.99pl8...


did you freeze youre whole machine or only the AE5-USB-Interface? (just to determine if i deploy your sandbox on my productive machine... ;))


The whole machine got funny as though it was out of file handles. I was working remotely (via SSH) and my session locked up. I attempted to log in again remotely and a few times I was able to get past the authentication prompts, but my session froze soon after. Ultimately I had to (remotely) power-cycle the machine.

I would suggest holding off on testing unless you have a machine you can tolerate going offline. I should have some cycles later on tonight to give it a more thorough test myself.

Raptor 2101

Full Member

Tuesday, August 13th 2013, 8:31pm

Than i have to wait till my riad is rebuilded ^^

JinTu

Full Member

Wednesday, August 14th 2013, 4:26pm


I have prototyped the alternate approach in my sandbox (commit a104b34be9290dee691529ce6dee08a8ff87fcc8). I need to give it some more testing though since I did manage to hang my devel box a few times as I was tweaking things. I must admit, this is the most fragility I have seen with stuff running in user space on Linux for a long time and I have been a Linux hacker since kernel 0.99pl8...


did you freeze youre whole machine or only the AE5-USB-Interface? (just to determine if i deploy your sandbox on my productive machine... ;))


The whole machine got funny as though it was out of file handles. I was working remotely (via SSH) and my session locked up. I attempted to log in again remotely and a few times I was able to get past the authentication prompts, but my session froze soon after. Ultimately I had to (remotely) power-cycle the machine.

I would suggest holding off on testing unless you have a machine you can tolerate going offline. I should have some cycles later on tonight to give it a more thorough test myself.


Hi folks hold tight for a little longer. I didn't get time to work on aerotools-ng last night due to family commitments, and will be on a business trip for a few days. I should be able to pick it back up towards the end of the week.

Raptor 2101

Full Member

Wednesday, August 14th 2013, 9:06pm

no problem. i have waited for over one year for linux support, so i doesn't matter to wait some days longer ;)

JinTu

Full Member

Saturday, August 17th 2013, 11:01am


I have prototyped the alternate approach in my sandbox (commit a104b34be9290dee691529ce6dee08a8ff87fcc8). I need to give it some more testing though since I did manage to hang my devel box a few times as I was tweaking things. I must admit, this is the most fragility I have seen with stuff running in user space on Linux for a long time and I have been a Linux hacker since kernel 0.99pl8...


did you freeze youre whole machine or only the AE5-USB-Interface? (just to determine if i deploy your sandbox on my productive machine... ;))


The whole machine got funny as though it was out of file handles. I was working remotely (via SSH) and my session locked up. I attempted to log in again remotely and a few times I was able to get past the authentication prompts, but my session froze soon after. Ultimately I had to (remotely) power-cycle the machine.

I would suggest holding off on testing unless you have a machine you can tolerate going offline. I should have some cycles later on tonight to give it a more thorough test myself.


Hi folks hold tight for a little longer. I didn't get time to work on aerotools-ng last night due to family commitments, and will be on a business trip for a few days. I should be able to pick it back up towards the end of the week.


I did some more testing and further tweaking on the prototype in my sandbox and have reduced the thrashing quite a bit from the initial version with read() removed. It seems to be working reliably for me, but would appreciate if were tested on a few other machines so I can validate the approach before merging in to the aerotools-ng repo for further testing.

The portion of the output from sandbox/HID-testing/hiddev/bin/test I am looking for from a single run looks like this:

Source code

1
2
3
4
5
6
7
8
9
10
** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 1
Value at 3 on page 1 matches (C2). Loop iteration 2
Value at 3 on page 2 matches (C4). Loop iteration 4
Value at 3 on page 3 matches (C6). Loop iteration 5
Value at 3 on page 4 matches (C8). Loop iteration 7
Value at 3 on page 5 matches (CA). Loop iteration 9
Value at 3 on page 6 matches (CC). Loop iteration 11
Value at 3 on page 7 matches (CE). Loop iteration 12
Last array index was 4184, number of wrong reports was 5


Also, if you could run sandbox/HID-testing/test-loop.sh and provide me the last line of output, I would be most appreciative.

Raptor 2101

Full Member

Sunday, August 18th 2013, 1:16pm

output from testloop

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Buffer too small. Report length 660, buffer length 658
Iteration 990
Buffer too small. Report length 660, buffer length 658
Iteration 991
Buffer too small. Report length 660, buffer length 658
Iteration 992
Buffer too small. Report length 660, buffer length 658
Iteration 993
Buffer too small. Report length 660, buffer length 658
Iteration 994
Buffer too small. Report length 660, buffer length 658
Iteration 995
Buffer too small. Report length 660, buffer length 658
Iteration 996
Buffer too small. Report length 660, buffer length 658
Iteration 997
Buffer too small. Report length 660, buffer length 658
Iteration 998
Buffer too small. Report length 660, buffer length 658
Iteration 999
Buffer too small. Report length 660, buffer length 658
Iteration 1000
Buffer too small. Report length 660, buffer length 658
Test completed in 18 minutes and 50 seconds
Encountered 0 failures during test (0%). Attempt success rate 100.00%


output from your test-binary:output.txt

did you need more?

JinTu

Full Member

Sunday, August 18th 2013, 9:58pm

output from testloop

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Buffer too small. Report length 660, buffer length 658
Iteration 990
Buffer too small. Report length 660, buffer length 658
Iteration 991
Buffer too small. Report length 660, buffer length 658
Iteration 992
Buffer too small. Report length 660, buffer length 658
Iteration 993
Buffer too small. Report length 660, buffer length 658
Iteration 994
Buffer too small. Report length 660, buffer length 658
Iteration 995
Buffer too small. Report length 660, buffer length 658
Iteration 996
Buffer too small. Report length 660, buffer length 658
Iteration 997
Buffer too small. Report length 660, buffer length 658
Iteration 998
Buffer too small. Report length 660, buffer length 658
Iteration 999
Buffer too small. Report length 660, buffer length 658
Iteration 1000
Buffer too small. Report length 660, buffer length 658
Test completed in 18 minutes and 50 seconds
Encountered 0 failures during test (0%). Attempt success rate 100.00%


output from your test-binary:[attach]4286[/attach]

did you need more?


Thanks Raptor 2101,

Sorry about that, but I neglected to provide a change that is needed for firmware 1028-1030 (I am still testing with 1027). Please set REPORT_DATA_LEN (line 199 in sandbox/HID-testing/hiddev/src/test.c) to 660 for your setup, recompile and try again.

Raptor 2101

Full Member

Sunday, August 18th 2013, 10:51pm

new tests - new results

Source code

1
2
Test completed in 26 minutes and 53 seconds
Encountered 427 failures during test (42.7000%). Attempt success rate 53.00%

JinTu

Full Member

Monday, August 19th 2013, 3:06am

new tests - new results

Source code

1
2
Test completed in 26 minutes and 53 seconds
Encountered 427 failures during test (42.7000%). Attempt success rate 53.00%


Hmm, that's not good. It looks like the delay timing needs to be tweaked a bit. Can you post a few extracts (of the lines I provided earlier) of both success and failure runs?

Raptor 2101

Full Member

Monday, August 19th 2013, 8:55am

new tests - new results

Source code

1
2
Test completed in 26 minutes and 53 seconds
Encountered 427 failures during test (42.7000%). Attempt success rate 53.00%


Hmm, that's not good. It looks like the delay timing needs to be tweaked a bit. Can you post a few extracts (of the lines I provided earlier) of both success and failure runs?


will do this this evening

Raptor 2101

Full Member

Monday, August 19th 2013, 8:45pm

On Success:

Source code

1
2
3
4
5
6
7
8
9
10
11
** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 1
Value at 3 on page 1 matches (C2). Loop iteration 3
Value at 3 on page 2 matches (C4). Loop iteration 4
Value at 3 on page 3 matches (C6). Loop iteration 6
Value at 3 on page 4 matches (C8). Loop iteration 7
Value at 3 on page 5 matches (CA). Loop iteration 9
Value at 3 on page 6 matches (CC). Loop iteration 10
Value at 3 on page 7 matches (CE). Loop iteration 12
Last array index was 4184, number of wrong reports was 5
watermarks match!



on Error:

Source code

1
2
3
4
5
6
7
8
9
10
11
** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 0
Failed to find enough matching report pages after 50 iterations!
Oops watermark at offset 20B is 00 (index 6), but should be 100!
Trying again...
Attempt 2
Sending the following request in report 0x9:
 >> usage_index=0 usage_code=0xFF000001 value=1
HIDIOCGFIELDINFO: field_index=522 maxusage=523 flags=0x2
	physical=0x0 logical=0x0 application=0xFF000001
	logical_minimum=0,maximum=255 physical_minimum=0,maximum=0


interestingly: the errors only occure in the last 1/3 of the itterations (itteration 700 and above). Not on error occur during the first 700 tries

JinTu

Full Member

Monday, August 19th 2013, 9:48pm

On Success:

Source code

1
2
3
4
5
6
7
8
9
10
11
** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 1
Value at 3 on page 1 matches (C2). Loop iteration 3
Value at 3 on page 2 matches (C4). Loop iteration 4
Value at 3 on page 3 matches (C6). Loop iteration 6
Value at 3 on page 4 matches (C8). Loop iteration 7
Value at 3 on page 5 matches (CA). Loop iteration 9
Value at 3 on page 6 matches (CC). Loop iteration 10
Value at 3 on page 7 matches (CE). Loop iteration 12
Last array index was 4184, number of wrong reports was 5
watermarks match!


This all looks good and essentially matches what I saw on my slower dev system.


on Error:

Source code

1
2
3
4
5
6
7
8
9
10
11
** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 0
Failed to find enough matching report pages after 50 iterations!
Oops watermark at offset 20B is 00 (index 6), but should be 100!
Trying again...
Attempt 2
Sending the following request in report 0x9:
 >> usage_index=0 usage_code=0xFF000001 value=1
HIDIOCGFIELDINFO: field_index=522 maxusage=523 flags=0x2
	physical=0x0 logical=0x0 application=0xFF000001
	logical_minimum=0,maximum=255 physical_minimum=0,maximum=0


interestingly: the errors only occure in the last 1/3 of the itterations (itteration 700 and above). Not on error occur during the first 700 tries


Most curious... It would appear as though either all of a sudden your USB communication speed with the Ae5 got a lot faster (which would suggest reducing the delay) or, there were a bunch of signals being sent to aerotools-ng which is causing the nanosleep loop to restart a lot and loose the delay timing precision. Was there anything interesting/different going in on your system in that last 300 iterations compared with the first 700?

To test the first theory, can you try changing:

Source code

1
req.tv_nsec = 8000000L; /* 0.008 seconds */

to

Source code

1
req.tv_nsec = 7000000L; /* 0.007 seconds */

and let me know if there are any changes in behavior?

Raptor 2101

Full Member

Tuesday, August 20th 2013, 12:07am

success-rate 100% after applying your change

JinTu

Full Member

Tuesday, August 20th 2013, 12:40am

success-rate 100% after applying your change


Nice!

Can you send me a few excerpts from these runs (as before) so I can get a sense of the range of extra loops that are generating "wrong reports"?

Raptor 2101

Full Member

Tuesday, August 20th 2013, 8:40pm

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 6
Value at 3 on page 1 matches (C2). Loop iteration 8
Value at 3 on page 2 matches (C4). Loop iteration 10
Value at 3 on page 3 matches (C6). Loop iteration 11
Value at 3 on page 4 matches (C8). Loop iteration 13
Value at 3 on page 5 matches (CA). Loop iteration 15
Value at 3 on page 6 matches (CC). Loop iteration 17
Value at 3 on page 7 matches (CE). Loop iteration 19
Last array index was 4184, number of wrong reports was 12
watermarks match!

** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 7
Value at 3 on page 1 matches (C2). Loop iteration 8
Value at 3 on page 2 matches (C4). Loop iteration 10
Value at 3 on page 3 matches (C6). Loop iteration 12
Value at 3 on page 4 matches (C8). Loop iteration 14
Value at 3 on page 5 matches (CA). Loop iteration 17
Value at 3 on page 6 matches (CC). Loop iteration 19
Value at 3 on page 7 matches (CE). Loop iteration 21
Last array index was 4184, number of wrong reports was 14
watermarks match!

** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 1
Value at 3 on page 1 matches (C2). Loop iteration 3
Value at 3 on page 2 matches (C4). Loop iteration 4
Value at 3 on page 3 matches (C6). Loop iteration 7
Value at 3 on page 4 matches (C8). Loop iteration 9
Value at 3 on page 5 matches (CA). Loop iteration 11
Value at 3 on page 6 matches (CC). Loop iteration 13
Value at 3 on page 7 matches (CE). Loop iteration 15
Last array index was 4184, number of wrong reports was 8
watermarks match!

** getting the 8x 0xC reports:
Value at 3 on page 0 matches (C0). Loop iteration 2
Value at 3 on page 1 matches (C2). Loop iteration 5
Value at 3 on page 2 matches (C4). Loop iteration 7
Value at 3 on page 3 matches (C6). Loop iteration 9
Value at 3 on page 4 matches (C8). Loop iteration 11
Value at 3 on page 5 matches (CA). Loop iteration 13
Value at 3 on page 6 matches (CC). Loop iteration 15
Value at 3 on page 7 matches (CE). Loop iteration 17
Last array index was 4184, number of wrong reports was 10
watermarks match!

JinTu

Full Member

Wednesday, August 21st 2013, 8:50am

Looks good. I'll roll this in to my devel branch soon and will need another round of longevity testing to see if any hangs still occur.

Raptor 2101

Full Member

Wednesday, August 21st 2013, 9:07am

my servers still waiting for an update. They running 24/7, should be long enough ;)

JinTu

Full Member

Thursday, August 22nd 2013, 2:07am

Ok, this has been incorporated into my devel branch of aerotools-ng. Give it a try and let me know how it goes.

Raptor 2101

Full Member

Thursday, August 22nd 2013, 8:40pm

installed and running

Raptor 2101

Full Member

Friday, August 23rd 2013, 9:29am

running 12 hours without problems ..

Similar threads