wolfcw / libfaketime

libfaketime modifies the system time for a single application
https://github.com/wolfcw/libfaketime
GNU General Public License v2.0
2.62k stars 319 forks source link

Issue with launching MySQL daemon on UBI8 container with libfaketime (MySQL version 8.2.0) #458

Open Ibasquare opened 5 months ago

Ibasquare commented 5 months ago

Problem

When attempting to launch the MySQL daemon within a UBI8 container using MySQL version 8.2.0 and the libfaketime library, we encountered an error related to pthread_cond_timedwait(). Specifically, the error message received is as follows: [ERROR] [MY-012567] [InnoDB] pthread_cond_timedwait() returned: 11: abstime={1707467185,556947903} [ERROR] [MY-013183] [InnoDB] Assertion failure: os0event.cc:333 thread 140120461235968

Steps to Reproduce

  1. Set up a UBI8 container environment.
  2. Install and configure libfaketime (v0.9.10) for time manipulation.
  3. Install MySQL version 8.2.0 within the container.
  4. Attempt to launch the MySQL daemon within the container.

Result

Launching the MySQL daemon results in the error described above, indicating an issue with pthread_cond_timedwait() and leading to an assertion failure in the InnoDB engine.

Additional Context

Upon investigation, it was found that compiling libfaketime with the -DFAKE_PTHREAD option and using it in the UBI8 container environment triggers this issue. Removing the -DFAKE_PTHREAD option from the Makefile resolves the problem, indicating a potential conflict between libfaketime's pthread emulation and MySQL's internal threading mechanisms. In addition, everything works as expected when using the same setup with a UBI7 container.