nona sometime crashes with gpu, for single image

Bug #1816250 reported by jpe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
Undecided
Unassigned

Bug Description

Nona, when using gpu (ubuntu, [GeForce MX150) sometimes crashes.
The error is typically

Feb 15 19:02:42 apollo19 kernel: [302516.363894] nona[32290]: segfault at 56100dbacda8 ip 00007fd2e21ba0dd sp 00007ffdfe26ea00 error 6 in libc-2.27.so[7fd2e2125000+1e7000]

It's a malloc problem.

If people are interested, I can do more tests

The error seems to depend on how one cuts a image, it seems to me.

Revision history for this message
tmodes (tmodes) wrote :

"sometimes crashes" is very vague. So further test would be fine.
Ideally a testcase which always crashes would be optimal. Otherwise the debug is very difficult.
(I'm using nona-gpu for a long time and had no crash until now.)

Changed in hugin:
status: New → Incomplete
Revision history for this message
jpe (jean-pierre-eckmann) wrote :

here is the output from a broken run. After the last line it says segmentation fault.
(NB : The "old official" ubuntu version DOES work,

second attachment follows

if you need more debug, let me know how to produce that...

ddd?

Revision history for this message
jpe (jean-pierre-eckmann) wrote :

the output

Revision history for this message
jpe (jean-pierre-eckmann) wrote :

here the output from ddd

Revision history for this message
tmodes (tmodes) wrote :

I can't reproduce the issue here. It runs fine here: Windows + ATI Mobility Radeon. Tested also (L)Ubuntu in a virtual machine. It took some time but finished without crash.
And backtrace does not give me a hint. The mentioned lines are some very general one, and the interesting ones (#7 and #8) are truncated.

Revision history for this message
jpe (jean-pierre-eckmann) wrote :

ok, more info

let me know what you need. There is something bizarre with the allocation.

(are you sure that the virtual linux really uses the gpu? without gpu, it DOES work)

from the backtrace
#8 0x00007ffff79aabbf in HuginBase::Nona::remapImage<vigra::BasicImage<vigra::RGBValue<unsigned char, 0u, 1u, 2u>, std::allocator<vigra::RGBValue<unsigned char, 0u, 1u, 2u> > >, vigra::BasicImage<float, std::allocator<float> >, vigra::BasicImage<vigra::RGBValue<unsigned char, 0u, 1u, 2u>, std::allocator<vigra::RGBValue<unsigned char, 0u, 1u, 2u> > >, vigra::BasicImage<unsigned char, std::allocator<unsigned char> > > (srcImg=..., srcAlpha=..., srcFlat=..., src=..., dest=..., outputROI=..., remapped=warning: RTTI symbol not found for class 'HuginBase::Nona::RemappedPanoImage<vigra::BasicImage<vigra::RGBValue<unsigned char, 0u, 1u, 2u>, std::allocator<vigra::RGBValue<unsigned char, 0u, 1u, 2u> > >, vigra::BasicImage<unsigned char, std::allocator<unsigned char> > >'
..., progress=0x55555577cc00) at /home/eckmann/HUGIN/hugin-hugin/src/hugin_base/nona/RemappedPanoImage.h:855

#7 0x00007ffff7810c0a in HuginBase::Nona::RemappedPanoImage<vigra::BasicImage<vigra::RGBValue<unsigned char, 0u, 1u, 2u>, std::allocator<vigra::RGBValue<unsigned char, 0u, 1u, 2u> > >, vigra::BasicImage<unsigned char, std::allocator<unsigned char> > >::remapImage<vigra::ConstBasicImageIterator<vigra::RGBValue<unsigned char, 0u, 1u, 2u>, vigra::RGBValue<unsigned char, 0u, 1u, 2u>**>, vigra::RGBAccessor<vigra::RGBValue<unsigned char, 0u, 1u, 2u> > > (this=0x5555559a4ad0, srcImg=..., interpol=<optimized out>, progress=0x55555577cc00, singleThreaded=<optimized out>) at /home/eckmann/HUGIN/hugin-hugin/src/hugin_base/nona/RemappedPanoImage.h:618

#6 vigra::BasicImage<vigra::RGBValue<unsigned char, 0u, 1u, 2u>, std::allocator<vigra::RGBValue<unsigned char, 0u, 1u, 2u> > >::operator= (this=0x5555559a4ad8, rhs=...) at /usr/local/include/vigra/basicimage.hxx:1102

#5 0x00007ffff77dfd0f in vigra::BasicImage<vigra::RGBValue<unsigned char, 0u, 1u, 2u>, std::allocator<vigra::RGBValue<unsigned char, 0u, 1u, 2u> > >::resizeCopy (rhs=..., this=0x5555559a4ad8) at /usr/local/include/vigra/basicimage.hxx:831

#4 vigra::BasicImage<vigra::RGBValue<unsigned char, 0u, 1u, 2u>, std::allocator<vigra::RGBValue<unsigned char, 0u, 1u, 2u> > >::resizeCopy (this=this@entry=0x5555559a4ad8, width=2082, height=2135, data=0x555555a34f00) at /usr/local/include/vigra/basicimage.hxx:1204

#3 0x00007ffff77dfb84 in __gnu_cxx::new_allocator<vigra::RGBValue<unsigned char, 0u, 1u, 2u> >::allocate (this=0x5555559a4af8, __n=4445070) at /usr/include/c++/7/ext/new_allocator.h:111

Revision history for this message
tmodes (tmodes) wrote :

Could you please try the attached patch if it fixes the crash?
(It just a guess.)

Revision history for this message
jpe (jean-pierre-eckmann) wrote :

still not ok. if you wish, we can communicate directly. I would give you my email

Revision history for this message
tmodes (tmodes) wrote :

Okay, found the culprit. Committed the changes to repository.

Changed in hugin:
milestone: none → 2019.0rc1
status: Incomplete → Fix Committed
tmodes (tmodes)
Changed in hugin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.