Beefy Boxes and Bandwidth Generously Provided by pair Networks BBQ
We don't bite newbies here... much
 
PerlMonks  

Re: Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"

by mattriff (Chaplain)
on Oct 27, 2004 at 12:53 UTC ( [id://403094]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"

I feel silly following up tachyon's great analysis with something so mundane, but...

On the subject of why the file gets corrupted, I recommend looking for file-locking bugs in the code that's calling Storable::store.

As it happens, I ran in to this same exact problem last week, and it hasn't recurred since I fixed my file locking mechanism to actually, you know, prevent concurrent writes. ;)

(My problems occurred using Perl 5.8.3 and Storable 2.13 on FreeBSD 4.10-STABLE, btw.)

  • Comment on Re: Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"

Replies are listed 'Best First'.
Re^2: Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"
by tachyon (Chancellor) on Oct 27, 2004 at 19:14 UTC

    Hi Matt,

    You up you are quite possibly right about the cause. As noted it looks like a buffer and offset issue. What I forgot to mention is that the restored data structure after the 8 bytes of edit stores and retrieves just fine. It could be that there are no missing bytes (as I speculated above) but that it is simply a locking issue as you suggest. Catching the croak and the datastructure will prove that either way. It will be interesting to find out.

    cheers

    tachyon

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403094]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.