corrupted size vs. prev_size

295 views
Skip to first unread message

Lorenzo Fiorini

unread,
Oct 18, 2024, 2:19:45 AM10/18/24
to harbou...@googlegroups.com
Hello, lately in a WSL2 Debian 12 X86_64 distro, I'm facing the message "corrupted size vs. prev_size" during harbour -gh compile. It's very random and it shows only that message without any other reference.

As far as I know it is a message that gcc uses to signal memory allocation issues.

Is there a way to get more info when it happens?

best regards,
Lorenzo

Aleksander Czajczynski

unread,
Oct 18, 2024, 3:55:43 AM10/18/24
to harbou...@googlegroups.com
Hello!

Doesn't sound nice. You might try to make a debug build of Harbour,:
HB_BUILD_DEBUG=yes make

Then install valgrind and analyze with it:
valgrind --leak-check=full -v ./harbour -gh [...]

Best regards, Aleksander Czajczyński

Lorenzo Fiorini

unread,
Oct 18, 2024, 4:03:48 AM10/18/24
to harbou...@googlegroups.com
On 18/10/2024 09:46, Aleksander Czajczynski wrote:
> Hello!
>
> Doesn't sound nice. You might try to make a debug build of Harbour,:
> HB_BUILD_DEBUG=yes make
>
> Then install valgrind and analyze with it:
> valgrind --leak-check=full -v ./harbour -gh [...]

Hello Aleksander, thanks for the hint, I'll try it.

BTW I just saw it and I could grab the whole msg:

...
corrupted size vs. prev_size while consolidating
zsh: IOT instruction (core dumped)
...

best regards,
Lorenzo

>
> Best regards, Aleksander Czajczyński
>
> Lorenzo Fiorini wrote:
>> Hello, lately in a WSL2 Debian 12 X86_64 distro, I'm facing the
>> message "corrupted size vs. prev_size" during harbour -gh compile.
>> It's very random and it shows only that message without any other
>> reference.
>>
>> As far as I know it is a message that gcc uses to signal memory
>> allocation issues.
>>
>> Is there a way to get more info when it happens?
>
>
--
Il presente messaggio è indirizzato esclusivamente ai destinatari. Tutte le informazioni
contenute, compresi eventuali allegati, sono confidenziali ai sensi del Regolamento (UE)
2016/679 e del D. Lgs. 196/2003. Pertanto ne sono vietati l'inoltro, la divulgazione e la
messa a disposizione in qualunque forma o modo, in mancanza di preventiva autorizzazione
del mittente. Qualora il messaggio Le fosse pervenuto per errore, La invitiamo cortesemente
ad eliminarlo in modo definitivo dando immediato riscontro.

This message is exclusively addressed to the recipients. All the information contained in this
message, including any attachments, is confidential in compliance with Regulation (UE)
2016/679 and Legislative Decree 196/2003. Therefore, forwarding, disclosing and making
the above-mentioned information available without prior authorization from the sender is
forbidden in any form or manner. If you have received this message in error, we kindly invite
you to delete it permanently and to notify the sender.
--

Aleksander Czajczynski

unread,
Nov 2, 2024, 7:52:44 AM11/2/24
to harbou...@googlegroups.com
Hello!

Today I've encountered spontaneous crashes in contrib build stage (hbmk2
compiling) when the build process is started with make -j4 or -j8
It's not visible on GitHub continuous integrations because contrib build
stage seems separated, I don't see -jobs= argument passed to hbmk2.
It also finishes build process here without multithreading enabled.

This is on quite old MSVC compiler, but i don't remember that to occur.
Also didn't spotted anything while working on Clang compiler support.

Anyway i'll try to bisect if any recent commit could be the cause.

Best regards, Aleksander

Lorenzo Fiorini

unread,
Nov 18, 2024, 6:29:46 AM11/18/24
to harbou...@googlegroups.com
Hi Aleksander did you find anything? Today I got a Bus error.

Aleksander Czajczynski

unread,
Nov 18, 2024, 9:36:47 AM11/18/24
to harbou...@googlegroups.com
Hi Lorenzo!

In my case I haven't located anything, even going back to a previously
properly working revision, now it has MT problems, so it suggests me
some kind of a libc vs compiler mismatch. Which could happen after
testing 30+ distributions of Clang. Though i can't spot anything in PATH
and SET's.

Maybe i'll try to stress test around your case with Debian 12 under
Valgrind.

Lorenzo Fiorini

unread,
Nov 18, 2024, 10:03:48 AM11/18/24
to harbou...@googlegroups.com

Thank you, Aleksander. I've experienced a similar, equally elusive issue.

I’ve only encountered this problem (infrequently) while running the Harbour compiler in a multi-threaded environment.
( BTW I’ve never seen it on my more frequently used macOS 15.1 (Intel) system, even with the same Git projects).

Today, I observed a “Bus error” on a Raspberry Pi 4:

uname -a = 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
gcc (Debian 12.2.0-14) 12.2.0

Previously, I encountered a “corrupted size vs prev. prev_size” error on WSL2:

uname -a: 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 GNU/Linux
gcc (Debian 12.2.0-14) 12.2.0

Best Regards,
Lorenzo

Filip Stoklosa

unread,
Jan 28, 2025, 5:45:56 AM1/28/25
to Harbour Developers

Hi,

This problem (corrupted size vs. prev_size) happens in function __dbdelim() when dbf has corrupted record (filled with binary zeros), on various Linux distributions.
Other function like SET INDEX TO or SEEK are working without a C level problem (core dumped), on Harbour level corrupted records just shows on random position using seek  and index file.

I can share the database with corrupted record on priv.

Regards
Filip

Aleksander Czajczynski

unread,
Jan 29, 2025, 8:47:23 AM1/29/25
to harbou...@googlegroups.com
Hello!

Please post the .dbf if you like, may be directly to my address. Simple
database with records appended and raw zeroed from the records offset
does not produce this effect.

Best regards, Aleksander
Reply all
Reply to author
Forward
0 new messages