Issue 11767

Title
GTK Client crash after "Pay" customer invoice after a period of inactivity on 6.4
Priority
bug
Status
testing
Nosy list
ced, dotbit, pokoli, tiyujopite
Assigned to
Keywords
patch

Created on 2022-10-05.12:08:15 by dotbit, last changed 1 month ago by dotbit.

Files

File name Uploaded Type Details
screenshot.png dotbit, 2022-10-28.09:41:49 image/png view
tryton.patch ced, 2022-10-23.18:14:04 text/plain view
sc1.png dotbit, 2022-10-13.14:59:51 image/png view
sc2.png dotbit, 2022-10-13.14:59:30 image/png view

Messages

Author: [hidden] (dotbit) Tryton translator
Date: 2022-10-28.09:41:49

Tests with 6.4 latest on windows and production database has the same problem
I tested also on Windows latest client, same crash.

Could you test with the attached patch.
Same thing happens after applying the patch, but now all the windows are responsive (meaning they repaint after moving, before they did not repaint.

I will test also with latest Openbsd 7.2, latest python, and tryt to reproduce on https://demo6.4.tryton.org/#demo6.4/

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-10-23.18:14:04

For me it is linked to the OpenBSD threading support by Python. To make the client more responsive we make many RPC call in a separate thread with callback. When an exception is raise for the RPC call, we put back to the GTK queue the task to process it so the main thread can popup dialog for example.
I suspect that this ping-pong between thread does not work correctly on OpenBSD. Could you test with the attached patch. If it is solving the problem we may just disable threading on OpenBSD.

Author: [hidden] (dotbit) Tryton translator
Date: 2022-10-13.15:29:48

Correction: I have never had the password dialog box pop up after pressing the Pay button.
It works in all other places such as before posting an invoice.

Author: [hidden] (dotbit) Tryton translator
Date: 2022-10-13.14:59:51

screenshot 1

Author: [hidden] (dotbit) Tryton translator
Date: 2022-10-13.14:59:30

I should point out that I have never had the password dialog box pop up, so the crash most likely happens when I am asked for the password.

Attached screenshot 2

Author: [hidden] (tiyujopite)
Date: 2022-10-05.17:46:04

Hi, I think I have experienced this same bug in version 6.0.

Server log
81744 139997626041920 [2022-10-05 15:38:57,120] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,126] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,127] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,133] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,134] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,142] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,142] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,150] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,151] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,157] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,158] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,165] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,166] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,174] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,175] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,182] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,182] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,189] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,189] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,196] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,196] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,205] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,205] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 - 81744 139997626041920 [2022-10-05 15:38:57,212] ERROR trytond.security session failed for '1' from '127.0.0.1' on database 'tryton_database' 81744 139997626041920 [2022-10-05 15:38:57,212] INFO werkzeug 127.0.0.1 - - [05/Oct/2022 15:38:57] "POST /tryton_database/ HTTP/1.1" 401 -

Client: I think nothing relevant
(tryton:13267): Gtk-CRITICAL **: 17:38:57.334: _gtk_container_get_border_width_set: assertion 'GTK_IS_CONTAINER (container)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: gtk_container_set_border_width: assertion 'GTK_IS_CONTAINER (container)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: _gtk_container_set_border_width_set: assertion 'GTK_IS_CONTAINER (container)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: _gtk_box_get_spacing_set: assertion 'GTK_IS_BOX (box)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: gtk_box_set_spacing: assertion 'GTK_IS_BOX (box)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: _gtk_box_set_spacing_set: assertion 'GTK_IS_BOX (box)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: gtk_button_box_get_layout: assertion 'GTK_IS_BUTTON_BOX (widget)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: gtk_box_set_spacing: assertion 'GTK_IS_BOX (box)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: _gtk_container_get_border_width_set: assertion 'GTK_IS_CONTAINER (container)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: gtk_container_set_border_width: assertion 'GTK_IS_CONTAINER (container)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.334: _gtk_container_set_border_width_set: assertion 'GTK_IS_CONTAINER (container)' failed (tryton:13267): Gtk-CRITICAL **: 17:38:57.335: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed

Author: [hidden] (dotbit) Tryton translator
Date: 2022-10-05.15:02:28

Are you sure it crashes?
1. After the confirmation dialog box appears, the background window is unresponsive
2. The payment floating window does not appear like it is supposed to
3. The background unresponsive gtk client window does not redraw its content.

For me it looks like you cancel (maybe without seeing it) the login window so the client exits.
I click only on "Pay". Any advice on how to understand if I am canceling it without seeing(!?)
But even if I cancel, the background window should not become unresponsive.
I am not pressing any keyboard keys.

Tests with 6.5 fresh database show no problem.
Tests with 6.4 latest on windows and production database has the same problem
Tests with 6.5 production database upgraded to 6.5 has the same problem.

Conclusion, I could not reproduce with a fresh database.

I suspect the problem is somehow related to my probably badly deformed account_ro wip CoA, although it should not be able to make the GTK client crash.

If I am unable to localize the problem within the week I will invalidate the issue.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-10-05.13:25:48
On 2022-10-05 12:45, Dimitrios Moustos wrote:
> >Are you sure it crashes? For me it looks like you cancel (maybe without seeing it) the login window so the client exits.
> 
> Check the grey boxes in the upper left corner of the screen.
> I have not had problems with any stray clicks/keyboard button-presses and this is about the only place where I have this problem in tryton.

I do not understand what you are talking about nor what you mean.
Author: [hidden] (dotbit) Tryton translator
Date: 2022-10-05.12:45:21

Are you sure it crashes? For me it looks like you cancel (maybe without seeing it) the login window so the client exits.

Check the grey boxes in the upper left corner of the screen.
I have not had problems with any stray clicks/keyboard button-presses and this is about the only place where I have this problem in tryton.

As the client is in this state I can not do anything with it, only way it to kill the process.
If I use xkill the process will remain.

This happens after I press "Pay" button.

I will also test on 6.5.

Author: [hidden] (dotbit) Tryton translator
Date: 2022-10-05.12:41:27

Logs on the client:

INFO:tryton.gui.window.view_form.model.record:Modified fields ['type'] of <Record 37@account.invoice at 4908880731632>
INFO:tryton.gui.window.view_form.model.record:Modified fields ['type'] of <Record 37@account.invoice at 4908880731632>

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: _gtk_container_get_border_width_set: assertion 'GTK_IS_CONTAINER (container)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: gtk_container_set_border_width: assertion 'GTK_IS_CONTAINER (container)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: _gtk_container_set_border_width_set: assertion 'GTK_IS_CONTAINER (container)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: _gtk_box_get_spacing_set: assertion 'GTK_IS_BOX (box)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: gtk_box_set_spacing: assertion 'GTK_IS_BOX (box)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: _gtk_box_set_spacing_set: assertion 'GTK_IS_BOX (box)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: gtk_button_box_get_layout: assertion 'GTK_IS_BUTTON_BOX (widget)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: gtk_box_set_spacing: assertion 'GTK_IS_BOX (box)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: _gtk_container_get_border_width_set: assertion 'GTK_IS_CONTAINER (container)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: gtk_container_set_border_width: assertion 'GTK_IS_CONTAINER (container)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.138: _gtk_container_set_border_width_set: assertion 'GTK_IS_CONTAINER (container)' failed

(tryton:80270): Gtk-CRITICAL **: 13:31:33.139: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
INFO:tryton.gui.window.view_form.model.record:Modified fields ['type'] of <Record 37@account.invoice at 4908880731632>
INFO:tryton.gui.window.view_form.model.record:Modified fields ['type'] of <Record 37@account.invoice at 4908880731632>

Btw, I run dwm 6.2 window manager on amd64 openbsd 7.0

Sao logged out and asked me to log in again, after that it worked. Going to test again while keeping sao logged in on other windows.

Sao also worked while I stayed logged in with activities in other windows, and then tested the payment button. It worked without problems.

DELETE from ir_session:
After executing this sql statement GTK client asked me for password, after entering the password it corrctly loaded the payment form.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-10-05.12:18:21

Are you sure it crashes? For me it looks like you cancel (maybe without seeing it) the login window so the client exits.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2022-10-05.12:15:45

Do you have any logs on the client? Expiring a session should not cause any problem.
Is the issue reproducible on sao?

If you want to test the issue without waiting you can just execute the following query: DELETE from ir_session which will remove all active sessions in the database. You can filter by create_uid to restrict the expiration of sessions to a specific user.

Author: [hidden] (dotbit) Tryton translator
Date: 2022-10-05.12:08:15

tryton 6.4.3, trytond 6.4.2

GTK Client crashes when I press "Pay" on customer invoice, after a period of inactivity.
The logs show where the problem starts:
[Wed Oct 05 09:29:48 2022] ERROR:trytond.security:session failed for '3' from '2a02:a58:6000:3::7' on database 'lampero'

I tested with 9 minutes inactivity, and with 6 minutes inactivity, it happens every time.
It happens even if I have other activity on other views/models.

Logs:
[Wed Oct 05 09:29:48 2022] INFO:werkzeug:2a02:a58:6000:3::7 - - [05/Oct/2022 09:29:48] "POST /lampero/ HTTP/1.1" 200 -
[Wed Oct 05 09:29:48 2022] INFO:trytond.wsgi:<JSONRequest 3@2a02:a58:6000:3::7 'http://dot.dotbit.ro:8000/lampero/' [POST] wizard.account.invoice.pay.create>
[Wed Oct 05 09:29:48 2022] INFO:trytond.wsgi:<JSONRequest 3@2a02:a58:6000:3::7 'http://dot.dotbit.ro:8000/lampero/' [POST] model.account.invoice.line.read>
[Wed Oct 05 09:29:48 2022] INFO:trytond.security:session timeout for '3' from '2a02:a58:6000:3::7' on database 'lampero'
[Wed Oct 05 09:29:48 2022] INFO:werkzeug:2a02:a58:6000:3::7 - - [05/Oct/2022 09:29:48] "ESC[31mESC[1mPOST /lampero/ HTTP/1.1ESC[0m" 401 -
[Wed Oct 05 09:29:48 2022] INFO:werkzeug:2a02:a58:6000:3::7 - - [05/Oct/2022 09:29:48] "POST /lampero/ HTTP/1.1" 200 -
[Wed Oct 05 09:29:48 2022] INFO:trytond.wsgi:<JSONRequest 3@2a02:a58:6000:3::7 'http://dot.dotbit.ro:8000/lampero/' [POST] model.account.invoice.tax.read>
[Wed Oct 05 09:29:48 2022] ERROR:trytond.security:session failed for '3' from '2a02:a58:6000:3::7' on database 'lampero'
[Wed Oct 05 09:29:48 2022] INFO:werkzeug:2a02:a58:6000:3::7 - - [05/Oct/2022 09:29:48] "ESC[31mESC[1mPOST /lampero/ HTTP/1.1ESC[0m" 401 -
[Wed Oct 05 09:29:48 2022] INFO:trytond.wsgi:<JSONRequest 2a02:a58:6000:3::7 'http://dot.dotbit.ro:8000/lampero/' [POST] common.db.login>
[Wed Oct 05 09:29:48 2022] INFO:werkzeug:2a02:a58:6000:3::7 - - [05/Oct/2022 09:29:48] "POST /lampero/ HTTP/1.1" 200 -
[Wed Oct 05 09:29:48 2022] INFO:trytond.wsgi:<JSONRequest 3@2a02:a58:6000:3::7 'http://dot.dotbit.ro:8000/lampero/' [POST] model.account.invoice.tax.read>
[Wed Oct 05 09:29:48 2022] ERROR:trytond.security:session failed for '3' from '2a02:a58:6000:3::7' on database 'lampero'
[Wed Oct 05 09:29:48 2022] INFO:werkzeug:2a02:a58:6000:3::7 - - [05/Oct/2022 09:29:48] "ESC[31mESC[1mPOST /lampero/ HTTP/1.1ESC[0m" 401 -
[Wed Oct 05 09:29:48 2022] INFO:trytond.wsgi:<JSONRequest 3@2a02:a58:6000:3::7 'http://dot.dotbit.ro:8000/lampero/' [POST] model.account.invoice.read>
[Wed Oct 05 09:29:48 2022] ERROR:trytond.security:session failed for '3' from '2a02:a58:6000:3::7' on database 'lampero'
[Wed Oct 05 09:29:48 2022] INFO:werkzeug:2a02:a58:6000:3::7 - - [05/Oct/2022 09:29:48] "ESC[31mESC[1mPOST /lampero/ HTTP/1.1ESC[0m" 401 -
[Wed Oct 05 09:29:48 2022] INFO:trytond.wsgi:<JSONRequest 3@2a02:a58:6000:3::7 'http://dot.dotbit.ro:8000/lampero/' [POST] model.account.invoice.read>
[Wed Oct 05 09:29:48 2022] ERROR:trytond.security:session failed for '3' from '2a02:a58:6000:3::7' on database 'lampero'

History
Date User Action Args
2022-10-28 09:41:49dotbitsetfiles: + screenshot.png
messages: + msg79418
2022-10-23 18:14:04cedsetcomponent: + tryton
files: + tryton.patch
keyword: + patch
messages: + msg79275
status: need-eg -> testing
2022-10-13 15:29:48dotbitsetmessages: + msg78939
2022-10-13 14:59:51dotbitsetfiles: + sc1.png
messages: + msg78938
2022-10-13 14:59:30dotbitsetfiles: + sc2.png
messages: + msg78937
2022-10-05 17:46:04tiyujopitesetmessages: + msg78602
nosy: + tiyujopite
2022-10-05 15:02:28dotbitsetmessages: + msg78591
2022-10-05 13:25:48cedsetmessages: + msg78589
status: unread -> need-eg
2022-10-05 12:45:21dotbitsetmessages: + msg78587
2022-10-05 12:41:27dotbitsetmessages: + msg78586
status: need-eg -> unread

Showing 10 items. Show all history (warning: this could be VERY long)