FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.19k stars 204 forks source link

Firebird for Android: Call to "isc_service_attach" crashing on Samsung OneUI6 (March 2024) Android 14 #8081

Open RdmState opened 1 month ago

RdmState commented 1 month ago

After upgrading a Samsung Active Tab 3 to OneUI6 and Android 14, my android application crashes when the Delphi library "FireDAC.Phys.IBWrapper" TIBService.Attach calls isc_service_attach. Exactly the same code worked fine and continues to work on Android 13 on both Samsung and non-Samsung devices.

I have tried Firebird 4.0.4.3010 and 4.0.2.2816. Both versions cause the same issue on Samsung's Android 14 (I have not tried other manufacturers, so I am uncertain if the issue specifically with OneUI or Android 14, but I have tested on multiple Samsung Android 14 devices). I have installed the debug version of 4.0.4.3010, but no log is generated that I can locate within the firebird directory or application directory on the device.

I have checked Google's documentation regarding changes in Android 14 and the only significant change that might be the cause of the issue appears to be mlock() has been reduced in size from 64Mb down to 64kb (if Firebird uses this).

I am willing to provide additional information (trace log or such) if someone can explain how I might activate one.

AlexPeshkoff commented 1 month ago

On 4/12/24 03:17, RdmState wrote:

After upgrading a Samsung Active Tab 3 to OneUI6 and Android 14, my android application crashes when the Delphi library "FireDAC.Phys.IBWrapper" TIBService.Attach calls isc_service_attach. Exactly the same code worked fine and continues to work on Android 13 on both Samsung and non-Samsung devices.

I have tried Firebird 4.0.4.3010 and 4.0.2.2816. Both versions cause the same issue on Samsung's Android 14 (I have not tried other manufacturers, so I am uncertain if the issue specifically with OneUI or Android 14, but I have tested on multiple Samsung Android 14 devices). I have installed the debug version of 4.0.4.3010, but no log is generated that I can locate within the firebird directory or application directory on the device.

The debug version is needed not to get additional logs but to work with the set of the named onjects in the debugger, in particular to produce meaningful stack trace at the point of a crash.

I have checked Google's documentation regarding changes in Android 14 and the only significant change that might be the cause of the issue appears to be mlock() has been reduced in size from 64Mb down to 64kb (if Firebird uses this).

Not used.

I am willing to provide additional information (trace log or such) if someone can explain how I might activate one.

Stack trace is needed first of all. You should use debugging facility of your phone to attach to it in debug mode, next start you task under debugger control, when it crashes - get full stack backtrace for all threads and send it here. Particular method of getting stack trace depends upon used debugger, for gdb it's thread apply all backtrace -full

hgourvest commented 1 week ago

I'm not sure, but it could be related to this bug. https://github.com/FirebirdSQL/firebird/issues/8110