Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zkserver] Unexpected session error #170

Open
marcopeereboom opened this issue Mar 22, 2021 · 1 comment
Open

[zkserver] Unexpected session error #170

marcopeereboom opened this issue Mar 22, 2021 · 1 comment

Comments

@marcopeereboom
Copy link
Contributor

Sever errors like this occured in zkserver

2021-03-20 16:08:09 [SES][ERR] sessionWriter write failed cb83f9f185c4b89dff9689a32c
cb742a5194a32d0097030fff2b8800d4d8d106: could not write push: could not marshal
@marcopeereboom
Copy link
Contributor Author

marcopeereboom commented Mar 23, 2021

The failure occurred in the xdr.Marshal call. Unfortunately, the xdr package is too loud in its errors so it always returns a generic could not marshal error. The likely failure is the underlying network connection being wedged somehow. The XDR marshal call does not fail in zkserver since the data has been curated before the marshal occurs. It is likely that this was an OS or network level issue. Under normal circumstances the connection would have been terminated and that obviously did not happen.

func (kx *KX) writeWithKey(data []byte, k *[32]byte) error {
        payload := secretbox.Seal(nil, data, &kx.writeSeq, k)
        incSeq(&kx.writeSeq)
        if uint(len(payload)) > kx.MaxMessageSize {
                return ErrOverflow
        }
        _, err := xdr.Marshal(kx.Conn, payload)
        if err != nil {
                return ErrMarshal // Error that is returned in this case
        }
        return nil
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant