Out of memory error when trying to compile drizzletest.cc

Bug #405131 reported by Lee Bieber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Critical
Robert Klahn

Bug Description

As of build 1096 we still two machines (debian 32 bit and centos 32 bit) where the machine runs out of memory when trying to compile drizzletest.cc

From Jay:
OK, so, I've tracked down the issue I was having with the replication branch to a difference in behaviour in atomic<> variables on CentOS (osindriz03) vs. other machines...hoping someone has an answer.

Here is the code which is behaving differently depending on the platform:

log_offset is declared as drizzled::atomic<off_t>.

log_offset= 0;
uint64_t length= 42;

off_t cur_offset;

cur_offset= log_offset.fetch_and_add((sizeof(uint64_t) + length));

On ALL other platforms other than CentOS 5, the above code sets log_offset AND cur_offset equal to 50.

On CentOS, it sets log_offset to 50 and cur_offset to 0.

What does this mean? It means that the assignment to cur_offset is happening *before* the call to drizzled::atomic<off_t>::fetch_and_add().

Without resorting back to mutexes, I am uncertain how to solve this particular timing/atomics problem. I'm hoping someone out there has more experience dealing with this.

Related branches

Changed in drizzle:
assignee: nobody → Jay Pipes (jaypipes)
importance: Undecided → Critical
milestone: none → aloha
status: New → Confirmed
Revision history for this message
Jay Pipes (jaypipes) wrote :

The comment below is about an unrelated bug (also on CentOS, which is probably where the confusion arose). Assigning back to nobody for now. Devananda and I tracked it down to something in r1095 that produces the problem, so we should investigate from there.

Changed in drizzle:
assignee: Jay Pipes (jaypipes) → nobody
Changed in drizzle:
assignee: nobody → Robert Klahn (rklahn)
Robert Klahn (rklahn)
Changed in drizzle:
status: Confirmed → Fix Committed
Changed in drizzle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.