Pagghiu / SaneCppLibraries

Sane C++ Libraries
https://pagghiu.github.io/SaneCppLibraries
MIT License
507 stars 11 forks source link

Examples has falls on Ubuntu #22

Closed colesnicov closed 2 weeks ago

colesnicov commented 3 weeks ago

Hi. I try the example and it fails. I didn't look at the code, I don't know what causes it. It goes wrong, it's just a matter of time. Sometimes it happens after 10 seconds, sometimes after 5 minutes, but it always crashes. I can't even try it..

denis@denis-omen:~/dev/SaneCppLibraries$ ./SC.sh build run SCExample 
Starting SC-build
SC-build "run" started
librarySource    = "/home/denis/dev/SaneCppLibraries"
toolSource       = "/home/denis/dev/SaneCppLibraries/Tools"
toolDestination  = "/home/denis/dev/SaneCppLibraries/_Build"
projects         = "/home/denis/dev/SaneCppLibraries/_Build/_Projects"
outputs          = "/home/denis/dev/SaneCppLibraries/_Build/_Outputs"
intermediates    = "/home/denis/dev/SaneCppLibraries/_Build/_Intermediates"
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample
Assertion failed: (false)
File: /home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../../Libraries/Async/Async.cpp
Function: stageSubmission
Line: 582
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(_ZN2SC6Assert14printBacktraceEPPvm+0x2f) [0x559e1f8cf4d9]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(_ZN2SC6Assert14printBacktraceEv+0xc0) [0x559e1f8cf414]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xff9893) [0x559e1f713893]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xffbc4a) [0x559e1f715c4a]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xffb434) [0x559e1f715434]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xff340e) [0x559e1f70d40e]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xf4e3a1) [0x559e1f6683a1]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xf4173c) [0x559e1f65b73c]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xf4185f) [0x559e1f65b85f]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xf6644d) [0x559e1f68044d]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xf67ed8) [0x559e1f681ed8]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(+0xf75b16) [0x559e1f68fb16]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(main+0x145) [0x559e1f68fee4]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x7c6df002a1ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7c6df002a28b]
/home/denis/dev/SaneCppLibraries/_Build/_Projects/Make/../../_Outputs/linux-x86_64-make-gcc-Debug/SCExample(_start+0x25) [0x559e1f5d9de5]
make: *** [Makefile.linux:1037: SCExample_RUN] Nedovolená instrukce (SIGILL) (obraz paměti uložen)
SC-build "run" finished (took 3418 ms)
Compile returned error
denis@denis-omen:~/dev/SaneCppLibraries$ 
Pagghiu commented 2 weeks ago

Thanks for reporting the issue. Unfortunately SCExample UI is not tested by the CI, I am manually testing it on macOS and Windows so Linux is a little under-tested. I will try it on some ubuntu VMs.

Pagghiu commented 2 weeks ago

I think the issue could be that SCExample has never been tested with SC::Async running using the io_uring backend. What version of ubuntu are you running? And do you have liburing installed? If yes what version?

colesnicov commented 2 weeks ago

I have liburing version

denis@denis-omen:~$ cat /usr/include/liburing/io_uring_version.h
/* SPDX-License-Identifier: MIT */
#ifndef LIBURING_VERSION_H
#define LIBURING_VERSION_H

#define IO_URING_VERSION_MAJOR 2
#define IO_URING_VERSION_MINOR 5

#endif

and version of Ubuntu is

denis@denis-omen:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04 LTS
Release:        24.04
Codename:       noble
Pagghiu commented 2 weeks ago

Thanks @colesnicov , I think that was the issue, I got a perfect repro with liburing installed on an ubuntu 22 VM.

The reason was: when using io_uring backend timers were also manually invoked, triggering the assertion you've been posting. I think this should be fixed by 3735432.

Could you please pull latest and try again?

colesnicov commented 2 weeks ago

Now it is works. Tank you.