Re: [Gluster-devel] mem-pool.c magic trailer causes SIGBUS, fix or remove?

2021-07-29 Thread Paul Jakma
Hi Amar, So fix is what I did first, but someone was wondering about the additional cost of the alignment calculation in the memory allocation path. (Though, the unaligned write of the trailer might be as many cycles of slowdown as a roundup calculation on platforms that handle unaligned

Re: [Gluster-devel] mem-pool.c magic trailer causes SIGBUS, fix or remove?

2021-07-29 Thread Amar Tumballi
Thanks for the initiative Paul. Let me answer the major question from the thread. > > Remove the trailer? Or fix it? Ideal one is to fix it, as we do use mem-pool info to identify leaks etc through statedumps of the process. Remove can be an option on SPARC to start with if fixing is time

[Gluster-devel] mem-pool.c magic trailer causes SIGBUS, fix or remove?

2021-07-27 Thread Paul Jakma
Hi, The magic trailer added at the end of memory allocations in mem-pool.c doesn't have its alignment ensured. This can lead to SIGBUS and abnormal exits on some platforms (e.g., SPARC64). I have a patch to round-up the header and allocation size to get the right alignment for the trailer