[Gambas-user] Gambas ARM/Innodb issue

Benoît Minisini gambas at ...1...
Sat Jan 11 18:00:14 CET 2014


Le 11/01/2014 17:25, Ron a écrit :
> You are right, only some comments on transactions, but no code differences.
>
> Wha we see happening is a disconnect from client when running on ARM,
> and gambas mysql reconnect option seems to reconnect most of the
> times, but sometimes it crashes.
>
> When db i MyISAM and arch ARM we see no disconnects, so no reconnects needed.
> That runs ok with same database.
> When we convert fields to Innodb, and restart program the issues happen.
>
> How can I debug/log mysql queries on highest level from gambas?
>
> Maybe goog to run valgrind to detect memory issues?
> Which bug caused most of the ARM bugs so far?
> Does it have to do with memory alignment?
>

When compiling a C source code on an ARM architecture, you can get a 
running program that could crash without any warning from the compiler.

Why?

On ARM, you can read a N-bytes words from memory (N being 1, 2 or 4) 
only if the memory address is a multiple of N. Otherwise you get a crash.

The Gnu C compiler ensure that. -But- if you declare a "packed" 
structure, i.e. a structure whose fields are "sticked" in memory 
(usually not to waste memory, or because you want to be sure of the 
total structure size), then the compiler does what you ask, tells 
nothing, and your program crashed at runtime, or have completely strange 
behaviours.

And you usually get that sort of problems on low-level programs like an 
interpreter (hum...) or a database server/driver. They need to do some 
weird things sometimes.

Of course, you can write your code carefully... if you know that ten 
years later a new CPU architecture will become popular. :-)

Try to use valgrind, you will get some clues if the problem is in the 
database driver.

Regards,

-- 
Benoît Minisini




More information about the User mailing list