Skip to content

Comments

Image data layer rng core dump#508

Merged
Yangqing merged 2 commits intoBVLC:devfrom
kloudkl:ImageDataLayer-RNG-core-dump
Jun 23, 2014
Merged

Image data layer rng core dump#508
Yangqing merged 2 commits intoBVLC:devfrom
kloudkl:ImageDataLayer-RNG-core-dump

Conversation

@kloudkl
Copy link
Contributor

@kloudkl kloudkl commented Jun 17, 2014

The back trace of the core dump file shows that the error occurs in caffe::ImageDataLayer<float>::PrefetchRand. The root cause is that prefetch_rng_ is not initialized properly in CreatePrefetchThread. Luckily, there is no such bug in the DataLayer and the WindowDataLayer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intended? I guess it is fine to initialize a RNG and not use it, but this modification seems unnecessary...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is. The change fixes the segementation fault caused by uninitialized prefetch_rng_. This is indeed a bug considering where prefetch_rng_ is used in the prefetch thread. Perhaps it was not caught earlier because the ImageDataLayer parameter combinations did not run through the specific code path.

The DataLayer and the WindowDataLayer are both correct in this respect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense :)

@Yangqing
Copy link
Member

Thanks for the update, merging...

@Yangqing Yangqing closed this Jun 23, 2014
@Yangqing Yangqing reopened this Jun 23, 2014
Yangqing added a commit that referenced this pull request Jun 23, 2014
@Yangqing Yangqing merged commit 71d6429 into BVLC:dev Jun 23, 2014
@kloudkl kloudkl deleted the ImageDataLayer-RNG-core-dump branch June 24, 2014 02:13
mitmul pushed a commit to mitmul/caffe that referenced this pull request Sep 30, 2014
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

Successfully merging this pull request may close these issues.

2 participants