Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
macid: corrupted state
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kamil Dworakowski  
View profile  
 More options Jun 18 2009, 1:40 pm
From: Kamil Dworakowski <ka...@dworakowski.name>
Date: Thu, 18 Jun 2009 10:40:16 -0700 (PDT)
Local: Thurs, Jun 18 2009 1:40 pm
Subject: macid: corrupted state
the error on start:

too few bytes. Failed reading at byte position 25

I deleted the last events file, and then it loaded fine.

It happens on windows, I'll check it later on my linux box at home. I
closed the console window that was running the process. Other
important bit is that the state in the app must have been last
modified a couple of hourse before I closed the window. I can
reproduce it easily. Any thoughts?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MightyByte  
View profile  
 More options Jun 18 2009, 2:25 pm
From: MightyByte <mightyb...@gmail.com>
Date: Thu, 18 Jun 2009 14:25:13 -0400
Local: Thurs, Jun 18 2009 2:25 pm
Subject: Re: macid: corrupted state
Usually when this has happened to me it's because the data that was in
state changed.  If you are using this as state:

data MyState = MyState Word16

And then decide that you need support for decimal numbers, you might
change it to this:

data MyState = MyState Double

The state system will try to read the binary representation for Word16
as if it were a Double.  If you need to make a change like this, you
either need to delete your old state and start empty, or you need to
migrate your old data.
http://nhlab.blogspot.com/2008/12/data-migration-with-happs-data.html
describes how to do a migration.

On Thu, Jun 18, 2009 at 1:40 PM, Kamil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 18 2009, 2:34 pm
From: Matthew Elder <m...@mattelder.org>
Date: Thu, 18 Jun 2009 11:34:05 -0700
Local: Thurs, Jun 18 2009 2:34 pm
Subject: Re: macid: corrupted state

there is an open ticket for this to have a more meaningful error message.

--
Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kamil Dworakowski  
View profile  
 More options Jun 18 2009, 3:33 pm
From: Kamil Dworakowski <ka...@dworakowski.name>
Date: Thu, 18 Jun 2009 12:33:27 -0700 (PDT)
Local: Thurs, Jun 18 2009 3:33 pm
Subject: Re: macid: corrupted state

On Jun 18, 7:25 pm, MightyByte <mightyb...@gmail.com> wrote:

> Usually when this has happened to me it's because the data that was in
> state changed.

Messing with types produced me:

apprazor: Junk after checkpoint for state: Main.State

This does not mean that the msg I got on windows can not be an effect
of a an unmigrated state. I am pretty sure the types were fine though.
I'll check it one more time tomorrow. OTOH, I could not get it to fail
like this on Linux, which is a good news.

BTW, when I changed type of one of the fields from string to double to
check how happstack would fail ... it did not. It interpreted all the
strings as 0.0.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MightyByte  
View profile  
 More options Jun 18 2009, 4:05 pm
From: MightyByte <mightyb...@gmail.com>
Date: Thu, 18 Jun 2009 16:05:42 -0400
Local: Thurs, Jun 18 2009 4:05 pm
Subject: Re: macid: corrupted state
Yes, dcoutts and I were discussing this exact issue on #happs earlier
today.  Errors from lack of migration show up at runtime and laziness
means that they don't always happen when state is loaded on startup.
Sometimes it runs fine until the offending data is used.

To fix this, we would probably need to embed some kind of
self-describing meta-data in the stored data.  I actually just wrote
my first migration for a production site today.  I haven't deployed it
yet, but these issues definitely cause for some worry.  In my opinion
this should probably be a pretty high priority.

On Thu, Jun 18, 2009 at 3:33 PM, Kamil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
awson  
View profile  
 More options Jun 19 2009, 3:35 am
From: awson <meurgl...@gmail.com>
Date: Fri, 19 Jun 2009 00:35:40 -0700 (PDT)
Local: Fri, Jun 19 2009 3:35 am
Subject: Re: macid: corrupted state
State is broken on windows. More than a year ago I've posted the
solution here:
http://groups.google.com/group/HAppS/browse_thread/thread/43588419337....
Nobody have cared.

On Jun 18, 8:40 pm, Kamil Dworakowski <ka...@dworakowski.name> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kamil Dworakowski  
View profile  
 More options Jun 19 2009, 5:42 am
From: Kamil Dworakowski <ka...@dworakowski.name>
Date: Fri, 19 Jun 2009 02:42:55 -0700 (PDT)
Local: Fri, Jun 19 2009 5:42 am
Subject: Re: macid: corrupted state
I confirm that. Applying the patch provided by awson fixes it.

On Jun 19, 8:35 am, awson <meurgl...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kamil Dworakowski  
View profile  
 More options Jun 19 2009, 5:47 am
From: Kamil Dworakowski <ka...@dworakowski.name>
Date: Fri, 19 Jun 2009 10:47:06 +0100
Local: Fri, Jun 19 2009 5:47 am
Subject: Re: macid: corrupted state

Here comes a patch for the happstack repo.

On Fri, Jun 19, 2009 at 10:42 AM, Kamil

  state-winfix.dpatch
17K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Jacobson  
View profile  
 More options Jun 19 2009, 6:38 am
From: Alex Jacobson <a...@alexjacobson.com>
Date: Fri, 19 Jun 2009 06:38:13 -0400
Local: Fri, Jun 19 2009 6:38 am
Subject: Re: macid: corrupted state
Would a solution to the laziness issue be one where HAppS attempts to write the checkpoint to /dev/null at startup?

-Alex-

On 6/18/09 4:05 PM, MightyByte wrote:
Yes, dcoutts and I were discussing this exact issue on #happs earlier
today.  Errors from lack of migration show up at runtime and laziness
means that they don't always happen when state is loaded on startup.
Sometimes it runs fine until the offending data is used.

To fix this, we would probably need to embed some kind of
self-describing meta-data in the stored data.  I actually just wrote
my first migration for a production site today.  I haven't deployed it
yet, but these issues definitely cause for some worry.  In my opinion
this should probably be a pretty high priority.

On Thu, Jun 18, 2009 at 3:33 PM, Kamil
Dworakowski<kamil@dworakowski.name> wrote:
  

On Jun 18, 7:25 pm, MightyByte <mightyb...@gmail.com> wrote:
    
Usually when this has happened to me it's because the data that was in
state changed.
      
Messing with types produced me:

apprazor: Junk after checkpoint for state: Main.State

This does not mean that the msg I got on windows can not be an effect
of a an unmigrated state. I am pretty sure the types were fine though.
I'll check it one more time tomorrow. OTOH, I could not get it to fail
like this on Linux, which is a good news.

BTW, when I changed type of one of the fields from string to double to
check how happstack would fail ... it did not. It interpreted all the
strings as 0.0.
    

  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MightyByte  
View profile  
 More options Jun 19 2009, 7:19 am
From: MightyByte <mightyb...@gmail.com>
Date: Fri, 19 Jun 2009 07:19:50 -0400
Local: Fri, Jun 19 2009 7:19 am
Subject: Re: macid: corrupted state
Possibly.  It would make failures more reliable, which would help, but
it wouldn't solve the problem of data format changes where the size of
a changed data item is invariant (i.e. changing a Word32 to four
Word8s).  The general solution is to include the schema (or possibly a
hash of the schema) as metadata that is part of the serialized data.
Something like Java's serialVersionUID (brief description towards the
end of http://java.sun.com/developer/technicalArticles/Programming/serializa...)
might be a suitable solution to this problem.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 29 2009, 11:48 am
From: Matthew Elder <sse...@gmail.com>
Date: Mon, 29 Jun 2009 08:48:54 -0700 (PDT)
Local: Mon, Jun 29 2009 11:48 am
Subject: Re: macid: corrupted state
Can we get a confirmation that this fixes the behavior against the
0.3.2 tag? I will release a 0.3.3 when I can get a confirmation (with
this patch).

On Jun 19, 2:47 am, Kamil Dworakowski <ka...@dworakowski.name> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kamil Dworakowski  
View profile  
 More options Jun 29 2009, 6:11 pm
From: Kamil Dworakowski <ka...@dworakowski.name>
Date: Mon, 29 Jun 2009 23:11:37 +0100
Local: Mon, Jun 29 2009 6:11 pm
Subject: Re: macid: corrupted state
yep, it is a good fix afaik


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 30 2009, 11:41 am
From: Matthew Elder <m...@mattelder.org>
Date: Tue, 30 Jun 2009 08:41:41 -0700
Local: Tues, Jun 30 2009 11:41 am
Subject: Re: macid: corrupted state
Did you test it?

On 6/29/09, Kamil Dworakowski <ka...@dworakowski.name> wrote:

--
Sent from my mobile device

Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kamil Dworakowski  
View profile  
 More options Jun 30 2009, 11:59 am
From: Kamil Dworakowski <ka...@dworakowski.name>
Date: Tue, 30 Jun 2009 16:59:55 +0100
Local: Tues, Jun 30 2009 11:59 am
Subject: Re: macid: corrupted state
yes

BTW why do you create tags for happstack-{server,state,...}-version
instead of just happstack-version?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 30 2009, 4:10 pm
From: Matthew Elder <m...@mattelder.org>
Date: Tue, 30 Jun 2009 13:10:47 -0700
Local: Tues, Jun 30 2009 4:10 pm
Subject: Re: macid: corrupted state
There is a possibility that we may release independent updates to each
cabal package as opposed to bumping everythying up. Esp in the case of
maintenance / bugfix version releases.

On 6/30/09, Kamil Dworakowski <ka...@dworakowski.name> wrote:

--
Sent from my mobile device

Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jul 5 2009, 4:03 pm
From: Matthew Elder <m...@mattelder.org>
Date: Sun, 5 Jul 2009 13:03:57 -0700
Local: Sun, Jul 5 2009 4:03 pm
Subject: Re: macid: corrupted state

applied to dev and stable, released happstack-state-0.3.3 to hackage.

On Fri, Jun 19, 2009 at 2:47 AM, Kamil Dworakowski
<ka...@dworakowski.name>wrote:

--
Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »