Closed GoogleCodeExporter closed 9 years ago
Original comment by ble...@gmail.com
on 18 May 2011 at 8:31
We're seeing this problem in our modeling package as well. Additional data
points:
- the attribute it can't open varies (it's not always .faceVaryingInterpolateBoundary.smp0)
- it's triggered when trying to play animation in the viewer (or read additional samples, as in the case of our modeling package)
- one way to reliably trigger the crash in the SimpleAbcViewer is to give an explicit path to the program, like "./bin/SimpleAbcViewer foo.abc", then start playing the animation.
Original comment by ard...@gmail.com
on 19 May 2011 at 10:59
Did you confirm that the attribute it is failing on exists in the file?
What other attributes has it tripped up on?
Is it always HDF Attributes, or will it miss a dataset as well?
If it does, have you tried using HDF 1.8.6 instead?
Original comment by miller.lucas
on 19 May 2011 at 11:27
Yes, the attribute does exist in the file (confirmed via h5ls -rv, abcecho,
import with Maya plugin, etc.). Other attributes: ".inherits.smp0" (from
AbcGeom::Xform), ".info" (from AbcCoreHDF5), ... I've seen a bunch, with
different attributes not found even with the exact same file, run at different
times (this is extremely non-deterministic).
More fun: running the viewer through gdb or valgrind causes the bug to not
manifest.
Original comment by ard...@gmail.com
on 20 May 2011 at 12:44
The behavior is strangely intermitent. It's also manifested as HDF5 erroring
for "inherits" and
#002: H5Adense.c line 405 in H5A_dense_open(): can't locate attribute in name index
major: Attribute
minor: Object not found
zeno_bin:
/var/tmp/doNotRemove/zeno/RHEL5_AMD64_OPT/include/boost/smart_ptr/shared_ptr.hpp
:409: T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const
[with T = Alembic::AbcCoreAbstract::v1::BasePropertyReader]: Assertion `px !=
0' failed.
ERROR: Cannot compute bounding box for L2wheelBJNT:
ISchemaObject::ISchemaObject( wrap )
ERROR: EXCEPTION:
IXformSchema::init()
I've rebuilt with 1.8.7 and SimpleAbcViewer now works, though nothing jumped
out at me from the release notes.
Original comment by ble...@gmail.com
on 20 May 2011 at 12:51
There were a BUNCH of bug fixes in HDF 1.8.6, there weren't as many fixes from
1.8.6 to 1.8.7. Check the release notes for 1.8.6 and look for valgrind.
Original comment by miller.lucas
on 20 May 2011 at 12:54
And actually I now do see two interesting notes in the release notes that could
be strong hints
- Fixed a bug that could occur when getting information for a new-style
group that was previously opened through a file handle that was later
closed. (NAF - 2010/09/15)
- Fixed many memory issues that valgrind exposed. (QAK - 2010/08/24)
Original comment by ble...@gmail.com
on 20 May 2011 at 12:55
Original comment by miller.lucas
on 26 May 2011 at 1:41
Original comment by ble...@gmail.com
on 31 May 2011 at 6:04
Original comment by ble...@gmail.com
on 31 May 2011 at 6:06
Does 1.8.7 fix these problems or not?
Original comment by miller.lucas
on 31 May 2011 at 6:10
This isn't a complete fix, however I have fixed some race conditions as part of
this chagneset
http://code.google.com/r/bleair-multithreaded-read/source/detail?r=a19e866b366ba
2eb4fc8c047c88e86473747086a
The previous code was calling sub.made.expired () and if that passed woudl try
to return that weak pointer. This check then return is a text book race.
Changed code to lock the weak pointer (in the words of Yoda, do or do not) -
either we get a real shared pointer to the BasePropertyReader or we get null
and we regenerate from the property header.
Original comment by ble...@gmail.com
on 1 Jun 2011 at 12:52
Hmm, I wonder if we need to just start using boost::scoped_lock or something
for all file-access-related stuff. I also wonder what the "enable-threadsafe"
option for HDF5 *does*.
To answer your question, we do still get this crash with HDF5 1.8.7.
Original comment by ard...@gmail.com
on 1 Jun 2011 at 10:32
Is there still problems with SimpleAbcViewer?
If not we should probably close this and open up a separate multi-thread issue.
Original comment by miller.lucas
on 1 Jun 2011 at 11:21
Joe, enable-threadsafe configure option to HDF5 results in pthreads and mutexes
being active in the HDF5 library so that it is multithread safe (not
concurrent, just safe). For Alembic to support multithreaded reading we need
this option active in HDF5.
Lucas, I changed the code that locks the weka pointers so that instead of
comparing to false I do if ( ! sub.made ), is this more to your style
preferences? I dont' care about the syle differences, but their is a race
condition if you don't call lock first. You can't use expired () and have
correct multithreaded code.
I've created a changeset with fixes for multithread read problems. The bugs are
real, though I can't tell if the SimpleAbcViewer would have encountered them or
not. See
http://code.google.com/r/bleair-multithreaded-read/source/detail?r=376b575bceb1b
4a577bed9adc442ff92c87fc386
Original comment by ble...@gmail.com
on 4 Jun 2011 at 1:16
Joe and I have already grabbed the first set of changes involving using lock
earlier and avoiding expired. That change wasn't controversial, the style
change suggestion was to remain consistent with the libraries style. (it isn't
necessarily my personal preference)
I've already looked at your use of boost::mutex, and need some time to mull it
over.
My initial instinct was that creating one per property seems excessive.
Original comment by miller.lucas
on 4 Jun 2011 at 1:26
Original comment by ble...@gmail.com
on 11 Jul 2011 at 8:24
Original issue reported on code.google.com by
ble...@gmail.com
on 18 May 2011 at 8:27