Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reassemble bug #14

Open
charryshi opened this issue Aug 27, 2021 · 2 comments
Open

reassemble bug #14

charryshi opened this issue Aug 27, 2021 · 2 comments

Comments

@charryshi
Copy link

Hi,I found a reassemble bug Under specific condition.
Here is the example log

{"timestamp":1630031299.3498211,"station_id":"test-01","channel":1,"freq":127.275,"level":-11,"error":0,"mode":"2","label":"C1","block_id":"M","ack":false,"tail":"B-xxxx","text":"msg example 1-1","end":true,"assstat":"in progress"}
{"timestamp":1630031306.879694,"station_id":"test-01","channel":1,"freq":127.275,"level":-11,"error":0,"mode":"2","label":"C1","block_id":"N","ack":false,"tail":"B-xxxx","text":"msg example 1-2","end":true,"assstat":"in progress"}
{"timestamp":1630031314.1785741,"station_id":"test-01","channel":1,"freq":127.275,"level":-11,"error":0,"mode":"2","label":"C1","block_id":"O","ack":false,"tail":"B-5528","text":"msg example 1-3","end":true,"assstat":"in progress"}
{"timestamp":1630031320.9381371,"station_id":"test-01","channel":1,"freq":127.275,"level":-11,"error":0,"mode":"2","label":"A4","block_id":"P","ack":false,"tail":"B-xxxx","text":"/WUHDCYA.FS1/FSM 0228 210827 ZXXXX\r\nCXA1111 CDA REJECTED\r\nCLEARANCE CANCELLED\r\nREVERT TO VOICE PROCEDURES\r\n1A01","assstat":"skipped"}

not msg lost, another type msg(label A4) started at block_id P after msg block_id O (label C1),but label C1 series not finished at this time, but after block_id P send will be out of sequence from reassemble

{"timestamp":1630031327.961997,"station_id":"test-01","channel":1,"freq":127.275,"level":-11,"error":0,"mode":"2","label":"C1","block_id":"Q","ack":false,"tail":"B-xxxx","text":"msg example 1-4","end":true,"assstat":"out of sequence"}

now
static uint32_t acars_key_hash(void const *key) {
acars_key *k = (acars_key *)key;
uint32_t h = la_hash_string(k->addr, LA_HASH_INIT);
h = la_hash_string(k->label, h);
h = la_hash_string(k->msn, h);
return h;
}

but I can't remove label from the code. I think maybe libacars can add another one identifies to make sure to the address msg is continuously ,not require prev_seq_num is continuously.

thanks a lot.

@szpajder
Copy link
Owner

Thanks for pointing this out. I am aware of this feature (it's called multiblock nesting), however when I was developing the reassembly code I couldn't find an evidence if it is actually used in practice. Apparently it is. Do you see this situation often?

Anyway, I'll put this feature on my TODO list. Can't give you an ETA right now though - it requires quite a significant rework and thorough testing afterwards.

@charryshi
Copy link
Author

Thanks for reply.I saw maybe 10% reassembly error because this question(the others are parity or crc error for receiving).
I think to fix it will need rewrite code structure, I glade to hear it on TODO list.
This project is great, thanks for your working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants