Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
W wendelin.core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • wendelin.core
  • Issues
  • #8

Closed
Open
Created Jan 04, 2017 by Ghost User@ghost

Protocol error when committing transaction in an existing ZODB in VM shared directory

The following code raises an OSError: [Errno 71] Protocol error at the second transaction commit when run with the shared directory of my VM as working directory. The wendelin version is 0.8.

The first set of instructions creates the database properly. When we re-open it, the content is still available and correct. But when the second set of instructions tries to add a new array and commit it, the error is raised. I could not reproduce the error in another folder.

import numpy as np
import transaction
from wendelin.bigarray.array_zodb import ZBigArray
from wendelin.lib.zodb import dbopen, dbclose

# Create the database
r = dbopen('test')
r['arr1'] = ZBigArray((30, 30), np.float)
transaction.commit()
dbclose(r)

# Re-open the same database
r = dbopen('test')
r['arr2'] = ZBigArray((30, 30), np.float)
transaction.commit() # OSError is raised here
dbclose(r)

Here is the stacktrace 💥

Traceback (most recent call last):
  File "/home/efn509/.PyCharmCE2016.3/config/scratches/scratch.py", line 9, in <module>
    transaction.commit()
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/transaction/_manager.py", line 124, in commit
    return self.get().commit()
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/transaction/_transaction.py", line 311, in commit
    reraise(t, v, tb)
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/transaction/_compat.py", line 56, in reraise
    raise value
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/transaction/_transaction.py", line 302, in commit
    self._commitResources()
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/transaction/_transaction.py", line 447, in _commitResources
    reraise(t, v, tb)
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/transaction/_compat.py", line 56, in reraise
    raise value
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/transaction/_transaction.py", line 424, in _commitResources
    rm.tpc_vote(self)
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/ZODB/Connection.py", line 786, in tpc_vote
    s = vote(transaction)
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/ZODB/FileStorage/FileStorage.py", line 720, in tpc_vote
    cp(self._tfile, self._file, dlen)
  File "/home/efn509/anaconda3/envs/wendelin/lib/python3.5/site-packages/ZODB/utils.py", line 141, in cp
    data = read(n)
OSError: [Errno 71] Protocol error

Here are the directory permissions:

abc999@debian8-abc999:/media/sf_shared$ ls -ld /media/sf_shared/
drwxrwx--- 1 root vboxsf 4096 Jan  4 15:04 /media/sf_shared/

And the user belongs to the vboxsf group and thus has all the permissions. Also, here are the details of the newly created ZODB :

-rwxrwx--- 1 root vboxsf   898 Jan  4 15:25 test
-rwxrwx--- 1 root vboxsf    56 Jan  4 15:25 test.index
-rwxrwx--- 1 root vboxsf     7 Jan  4 15:25 test.lock
-rwxrwx--- 1 root vboxsf   727 Jan  4 15:25 test.tmp
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7