Bug 15154

Summary: glib-2.0: glib/codegen.py.test ptest failure
Product: [QA/Testing] Package Testing (ptest) Reporter: Luca Ceresoli <luca.ceresoli>
Component: ptestAssignee: Unassigned <unassigned>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Medium CC: alex.kanavin, alexandre.belloni, joaomarcos.costa, JPEWhacker, randy.macleod, richard.purdie, ross.burton, tgamblin
Version: unspecified   
Target Milestone: 5.3   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
ptest log none

Description Luca Ceresoli 2023-06-23 12:29:52 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/5071/steps/12/logs/stdio

qemuarm64-ptest on ubuntu2004-arm-1

NOTE: recipe core-image-ptest-python3-hypothesis-1.0-r0: task do_testimage: Started
WARNING: core-image-ptest-glib-2.0-1.0-r0 do_testimage: There were failing ptests.
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py", line 27, in test_ptestrunner_expectfail
    self.do_ptestrunner()
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py", line 120, in do_ptestrunner
    self.fail(failmsg)
AssertionError: 
Failed ptests:
{'glib-2.0': ['glib/codegen.py.test']}
Comment 1 Luca Ceresoli 2023-06-23 12:31:12 UTC
Moved the builddir to /home/pokybuild/qemuarm64-ptest-5071-bug15154-glib-codegen on the worker (ubuntu2004-arm-1)
Comment 2 Luca Ceresoli 2023-06-23 12:32:42 UTC
Created attachment 4958 [details]
ptest log
Comment 3 Ross Burton 2023-06-23 14:30:58 UTC
My horrible fear is that this test case is notable for writing a lot to the console, so the recent changes to ptest-runner have introduced another race/crash.
Comment 4 Trevor Gamblin 2023-06-27 15:22:54 UTC
Seems to happen about 50% of the time when I'm running the ptest in a local build of core-image-ptest-glib-2.0:

for i in {1..100}; do ptest-runner glib-2.0 2>&1 | tee -a mountdir/ptest-$i.log; done

...

root@qemux86-64:~# grep -r "FAIL: 1" mountdir/ | wc -l
47
Comment 5 Trevor Gamblin 2023-06-27 17:12:45 UTC
The test does indeed write a lot of text to the console (I captured 22640 lines in one test result, and 22734 in another). When it fails, I see output like these examples:

# static void                                                                                                                                                                                                                                                                                                                 
# org_project_bar_frobnicator_skeleton_iface_init (OrgProjectBarFrobnicatorIface *iface G_GNUC_UNUSED)                                                                                 
# {                                                                                                                                                                                                                                                                                                                           
# }                                                                                                                                                                  
#                                                                                                                   
# /**                                                                                                                                               
#  * org_project_bar_frobnicator_skeleton_new:                                                                                                                                                                                                                                                                                
#  *                                                                                                                                                                                                                                                                                                                          
#  * Creates a skeleton object for the D-Bus interface <link linkendFAIL: glib/codegen.py.test (Child process exited with code 1)                     
Running test: glib/markup-parse.test                                                                                                                                                                                                                                                                                          
TAP version 13                                                                                                                                                                                                                                                                                                                
# random seed: R02S524b5572c18b7a8b31b4e94a3251b322                                                                                                                                                                                                                                                                           
1..71                                                                                                                                                                                                                                                                                                                         
# Start of markup tests

...

#  * The calling thread is blocked until a reply is received.                                                                                                        
#  *                                                                                                  
#  * See com_acme_coyote_proxy_new() for the asynchronous version of this constructor.                  
#  *                                                                                                                                                                                  
#  * Returns: (transfer full) (type ComAcmeCoyoteProxy): The constructed proxy object or %NULL if @error is set.
#  */                                                                                                 
# ComAcmeCoyote *                                                                                                
# com_acme_coyote_proxy_new_sync (                                                                                                                                                           
#     GDBusConnection     *connection,                                                                             
#     GDBusProxyFlags      flags,                                                                                                                                                      
#     const gchar         *name,                                                                                                                                                      
#     const gchar         *object_path,                                                                          
#     GCancellable        *cancellable,                                                                             
#     GError             **error)                                                                                                                   
# {                                                                                                                                                                                                                                                                                                                           
#   GInitable *ret;                                                                          
#   reFAIL: glib/codegen.py.test (Child process exited with code 1)                                   
Running test: glib/gobject-private.test            
TAP version 13                                                                                        
# random seed: R02Sd5f5e2618a8b992c5b1ce1ce197541ec                                                              
1..3                                                                                                                                                                                         
# Start of private tests
Comment 6 Alexander Kanavin 2023-06-28 14:27:50 UTC
I can reliably reproduce this, and I can confirm that reverting ptest-runner changes make the issue disappear :(
Comment 7 Richard Purdie 2023-06-28 22:28:48 UTC
The ptest change changed the operations from blocking to non-blocking which probably has something to do with this...
Comment 8 Randy MacLeod 2023-06-29 14:40:15 UTC
Alex, if you could find time to work on this soonish, that would be great. YP bug review
Comment 9 Joshua Watt 2023-06-29 16:11:26 UTC
I reworked this to eliminate the threads and race conditions, which should fix the problem if it's in ptest-runner: https://lists.yoctoproject.org/g/yocto/message/60479
Comment 10 Alexander Kanavin 2023-06-29 18:35:45 UTC
Thanks Joshua, this does seem to eliminate the fails here.
Comment 11 Alexandre Belloni 2023-07-18 17:37:15 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/81/builds/5231/steps/13/logs/stdio

qemux86-64-ptest ubuntu1804-ty-3
Comment 12 Alexandre Belloni 2023-07-19 14:21:29 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/5091/steps/12/logs/stdio

qemuarm64-ptest ubuntu2204-arm-1
Comment 13 Alexandre Belloni 2023-07-19 14:23:43 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/5063/steps/12/logs/stdio

qemuarm64-ptest ubuntu2004-arm-1
Comment 14 Alexandre Belloni 2023-07-19 14:27:55 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/81/builds/5256/steps/12/logs/stdio

qemux86-64-ptest fedora38-ty-3
Comment 15 Alexandre Belloni 2023-07-19 16:57:09 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/81/builds/5239/steps/12/logs/stdio

qemux86-64-ptest ubuntu2004-ty-1
Comment 16 Alexander Kanavin 2023-07-19 20:31:17 UTC
Almost certainly caused by https://git.yoctoproject.org/poky/commit/?h=master-next&id=191bb1e95fda12067df4c707e5409ecf5c8e370f

I sent a revert.
Comment 17 Alexander Kanavin 2023-07-19 20:49:28 UTC
NVM, these newly added links are all for old failures.
Comment 19 João Marcos Costa 2025-07-08 09:35:31 UTC
It happened again, this time in riscv64.

https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/184/steps/12/logs/stdio

Failed ptests:{'glib-2.0': ['glib/codegen.py.test']}

qemuriscv64-ptest alma9-vk-2

I see the same pattern of enormous amounts of text as in the previous logs. Reopening.
Comment 20 Randy MacLeod 2025-07-10 14:46:33 UTC
Now happening on RISCV only so far. Why?
Comment 21 Alexander Kanavin 2025-07-14 15:44:20 UTC
This may be a different failure that is specific to risc-v. Can you link to the logs where you see the enormous output?
Comment 22 João Marcos Costa 2025-07-29 08:56:16 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/267/steps/12/logs/stdio

Failed ptests:{'glib-2.0': ['glib/codegen.py.test', 'glib/gi-compile-repository.py.test']}

qemuriscv64-ptest stream9-vk-1
Comment 24 João Marcos Costa 2025-08-20 08:08:11 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/379/steps/12/logs/stdio

qemuriscv64-ptest fedora42-vk-1
Comment 25 Trevor Gamblin 2025-09-04 14:45:34 UTC
Duplicate of 15891. See there for new discussion.

*** This bug has been marked as a duplicate of bug 15891 ***