bitwiseworks / qtwebengine-chromium-os2

Port of Chromium and related tools to OS/2
9 stars 2 forks source link

LIBCx crash in interrupt_request_release #43

Closed dmik closed 3 years ago

dmik commented 3 years ago

Sometimes when running the 5.15 simplebrowser app after fixing #41 I get an assertion in LIBCx at some arbitrary points, here is the output:

007e6af7 04 ff 0000 Asrt: Assertion Failed!!!
007e6af7 04 ff 0000 Asrt: Function: <NULL>
007e6af7 04 ff 0000 Asrt: File:     D:/Coding/libcx/master/src/libcx/interrupt.c
007e6af7 04 ff 0000 Asrt: Line:     618
007e6af7 04 ff 0000 Asrt: Expr:     res == release_res
007e6af7 04 ff 0000 Asrt: 
===== LIBCx resource usage =====
Reserved memory size:  2097152 bytes
Committed memory size: 131072 bytes
Heap size total:       130656 bytes
Heap size used now:    39905 bytes
ProcDesc structs used now:       25
FileDesc structs used now:       229
SharedFileDesc structs used now: 50
===== LIBCx global mutex owner =====
mutex handle: 800100af
owner PID:    0b97 (2967)
owner TID:    4
===== LIBCx stats end =====

I wonder why I don't also get a .TRP with the stack trace. This must somehow deal with the fact that EXCEPTQ exception handling is now moved to LIBC...

dmik commented 3 years ago

Fixing https://github.com/bitwiseworks/libc/issues/111 gives us a nice .TRP when this happens:

 033BEDB4  1E19F048   LIBCX0    0001:0000F048  interrupt.c#618 _interrupt_request_release + 88 0001:0000EFC0 (D:\Coding\libcx\master\src\libcx\interrupt.c)

  Offset Name                 Type                         Hex Value
  ÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄ
   8     result               pointer to type 0x24F        BEFE5540

 033BEDE4  1E19E499   LIBCX0    0001:0000E499  handles.c#598 _libcx_take_handles + 1E9 0001:0000E2B0 (D:\Coding\libcx\master\src\libcx\handles.c)

  Offset Name                 Type                         Hex Value
  ÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄ
   8     handles              pointer to type 0x249        204DB488
   12    num_handles          32 bit unsigned              1
   16    pid                  32 bit signed                360
   20    flags                32 bit signed                1
  -20    result               0x263                        0
  -16    fd                   32 bit signed                0
  -12    pFH                  pointer to type 0x241        20842D18
  -16    fd                   32 bit signed                0
  -12    pFH                  pointer to type 0x241        20842D18
  -16    fd                   32 bit signed                0
  -12    pFH                  pointer to type 0x241        20842D18
  -16    fd                   32 bit signed                0
  -12    pFH                  pointer to type 0x241        20842D18
  -20    result               0x263                        0
  -20    result               0x263                        0
  -20    result               0x263                        0
  -20    result               0x263                        0

 033BEE44  B3B770DC   QT5WEBCD  0001:028770DC   std::vector<mojo::PlatformHandle, std::allocator<mojo::PlatformHandle> >::_M_default_append(unsigned int) + 42C 0001:02876CB0 (channel_posix.o)

 033BEFA4  B3B2064E   QT5WEBCD  0001:0282064E   mojo::core::Channel::TryDispatchMessage(base::span<char const, 4294967295u>, unsigned int*) + 13E 0001:02820510 (channel.o)

 033BF104  B3B213D4   QT5WEBCD  0001:028213D4   mojo::core::Channel::OnReadComplete(unsigned int, unsigned int*) + E4 0001:028212F0 (channel.o)

 033BF244  B3B7AFB8   QT5WEBCD  0001:0287AFB8   __ZN7logging17MakeCheckOpStringIyyEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc$w$fOFZKZc9jW7bHItF1 + 3E18 0001:028771A0 (channel_posix.o)

 033BF3A4  B838B9D5   QT5WEBCD  0001:0708B9D5   base::MessagePumpLibevent::OnLibeventNotification(int, short, void*) + E5 0001:0708B8F0 (base_jumbo_42.o)

 033BF524  11B5548B   EVNT217   0001:0001548B 

 033BF594  11B55D5E   EVNT217   0001:00015D5E 

 033BF604  B838DA10   QT5WEBCD  0001:0708DA10   base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) + 90 0001:0708D980 (base_jumbo_42.o)

 033BF764  B87EDBD3   QT5WEBCD  0001:074EDBD3   base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 153 0001:074EDA80 (base_jumbo_23.o)

 033BF894  B78809E6   QT5WEBCD  0001:065809E6   base::RunLoop::AfterRun() + 1066 0001:0657F980 (base_jumbo_17.o)

 033BFA04  B788403A   QT5WEBCD  0001:0658403A   base::RunLoop::Run() + 3A 0001:06584000 (base_jumbo_17.o)

 033BFB14  B7734535   QT5WEBCD  0001:06434535   base::Thread::Run(base::RunLoop*) + A5 0001:06434490 (base_jumbo_28.o)

 033BFC44  BE4E078C   QT5WEBCD  0001:0D1E078C   content::BrowserProcessSubThread::IOThreadRun(base::RunLoop*) + 3C 0001:0D1E0750 (browser_process_sub_thread.o)

 033BFC74  BE4E08CC   QT5WEBCD  0001:0D1E08CC   content::BrowserProcessSubThread::Run(base::RunLoop*) + CC 0001:0D1E0800 (browser_process_sub_thread.o)

 033BFD94  B774742E   QT5WEBCD  0001:0644742E   base::Thread::ThreadMain() + 4EE 0001:06446F40 (base_jumbo_28.o)

 033BFF04  B76D797D   QT5WEBCD  0001:063D797D   base::HighResolutionTimerManager::~HighResolutionTimerManager() + 52D 0001:063D7450 (base_jumbo_39.o)

 033BFF34  1DDE11E2   PTHR01    0001:000011E2  my_os2thread.c#111 _pthread_exit + A2 0001:00001140 (D:\Users\dmik\rpmbuild\BUILD\pthread-os2-0.2.4\src\my_os2thread.c)

 033BFF64  1E1980D2   LIBCX0    0001:000080D2  beginthread.c#99 __beginthread - 1E 0001:000080F0 (D:\Coding\libcx\master\src\beginthread.c)

 033BFFB4  1E07813E   LIBCN0    0001:0005813E  beginthr.c#38 ___libc_back_threadCreate - 6A 0001:000581A8 (beginthr.obj)

 033BFFF4  1FFECE38   DOSCALL1  0004:0000CE38  DOS32R3EXITADDR
dmik commented 3 years ago

Note that I only see it if --enable-features=NetworkServiceInProcess is in QTWEBENGINE_CHROMIUM_FLAGS so far.