Opened 4 years ago

Last modified 3 years ago

#1096 new defect

Padre freeze

Reported by: Sewi Owned by:
Priority: critical Milestone:
Component: editor Version: trunk
Keywords: Cc:

Description

The directory browser sometimes freezes Padre to 100% CPU usage.

Appears randomly, hard to reproduce.

Last time it happend:

  • I added a new dir to "lib"
  • Clicked on the "-" in front of "lib" to collapse the tree
  • Clicked on the "+" in front of "lib" to expand the tree with rescan
  • Quickly clicked on "-" and then "+" again by accident.

It happens sometimes just by one click to expand a tree.

Looks like an endless loop within the directory scanning code, maybe a race condition between two tasks.

Change History (6)

comment:1 Changed 4 years ago by Sewi

Freeze happend during normal work without touching the directory tree browser.

Additional data:

Padre threads:
pstree -p 11043
perl(11043)─┬─{perl}(11044)

├─{perl}(11050)
└─{perl}(16932)

strace -p 11043
Process 11043 attached - interrupt to quit
Process 11043 detached

strace -p 11044
Process 11044 attached - interrupt to quit
futex(0xb6d004ec, FUTEX_WAIT_PRIVATE, 1, NULLC <unfinished ...>
Process 11044 detached

strace -p 11050
Process 11050 attached - interrupt to quit
futex(0xe0bfac4, FUTEX_WAIT_PRIVATE, 45, NULLC <unfinished ...>
Process 11050 detached

strace -p 16932
Process 16932 attached - interrupt to quit
futex(0x110234a4, FUTEX_WAIT_PRIVATE, 9, NULLC <unfinished ...>
Process 16932 detached

The detaches have been manual user interrupt breaks.

Seems the main process is blocked by some endless loop which does no kernel calls.

comment:2 Changed 4 years ago by Sewi

Last lines from dev -t --die -a before freeze:

# Thu Mar 24 15:02:59 2011 Padre::Role::Task::task_owner 'Padre::Role::Task'
# Thu Mar 24 15:02:59 2011 Padre::Wx::Directory::browse_message Padre::Wx::Directory=HASH(0x9b60c00)
# Thu Mar 24 15:02:59 2011 Padre::Wx::Role::Conduit::on_signal Wx::PlThreadEvent=SCALAR(0xbe5c8b8)
# Thu Mar 24 15:02:59 2011 Padre::TaskManager::on_signal Padre::TaskManager=HASH(0x9d79c48)
# Thu Mar 24 15:02:59 2011 Padre::TaskHandle::idle_time Padre::TaskHandle=HASH(0x125690a0)
# Thu Mar 24 15:02:59 2011 Padre::TaskHandle::on_message Padre::TaskHandle=HASH(0x125690a0)
# Thu Mar 24 15:02:59 2011 Padre::Role::Task::task_owner 'Padre::Role::Task'
# Thu Mar 24 15:02:59 2011 Padre::Wx::Directory::browse_message Padre::Wx::Directory=HASH(0x9b60c00)
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::TaskHandle::message Padre::TaskHandle=HASH(0xb6c2e600)
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::Wx::Role::Conduit::signal 'Padre::Wx::Role::Conduit'
# Thu Mar 24 15:02:59 2011 Padre::Wx::Role::Conduit::on_signal Wx::PlThreadEvent=SCALAR(0xbe64dd0)
# Thu Mar 24 15:02:59 2011 Padre::TaskManager::on_signal Padre::TaskManager=HASH(0x9d79c48)
# Thu Mar 24 15:02:59 2011 Padre::TaskHandle::idle_time Padre::TaskHandle=HASH(0x125690a0)
# Thu Mar 24 15:02:59 2011 Padre::TaskHandle::on_message Padre::TaskHandle=HASH(0x125690a0)
# Thu Mar 24 15:02:59 2011 Padre::Role::Task::task_owner 'Padre::Role::Task'
# Thu Mar 24 15:02:59 2011 Padre::Wx::Directory::browse_message Padre::Wx::Directory=HASH(0x9b60c00)
# Thu Mar 24 15:02:59 2011 Padre::Wx::Role::Conduit::on_signal Wx::PlThreadEvent=SCALAR(0xbe5c8b8)
# Thu Mar 24 15:02:59 2011 Padre::TaskManager::on_signal Padre::TaskManager=HASH(0x9d79c48)
# Thu Mar 24 15:02:59 2011 Padre::TaskHandle::idle_time Padre::TaskHandle=HASH(0x125690a0)
# Thu Mar 24 15:02:59 2011 Padre::TaskHandle::on_message Padre::TaskHandle=HASH(0x125690a0)
# Thu Mar 24 15:02:59 2011 Padre::Role::Task::task_owner 'Padre::Role::Task'
# Thu Mar 24 15:02:59 2011 Padre::Wx::Directory::browse_message Padre::Wx::Directory=HASH(0x9b60c00)
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::TaskHandle::message Padre::TaskHandle=HASH(0xb6c2e600)
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::Wx::Role::Conduit::signal 'Padre::Wx::Role::Conduit'
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::TaskHandle::message Padre::TaskHandle=HASH(0xb6c2e600)
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::Wx::Role::Conduit::signal 'Padre::Wx::Role::Conduit'
# Thu Mar 24 15:02:59 2011 (Thread 3) (eval) 'Calling ->stopped'
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::TaskHandle::stopped Padre::TaskHandle=HASH(0xb6c2e600)
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::TaskHandle::message Padre::TaskHandle=HASH(0xb6c2e600)
# Thu Mar 24 15:02:59 2011 (Thread 3) Padre::Wx::Role::Conduit::signal 'Padre::Wx::Role::Conduit'

Freezes may be more in r14158 than before, but it may also be by chance.

Waiting some minutes doesn't help, so it's a real deadly freeze and not a temporary one.

comment:3 Changed 4 years ago by Sewi

Another freeze dump, there is no increasing number of freezes after r14158.

# Fri Mar 25 17:04:29 2011 (Thread 2) Padre::TaskHandle::message Padre::TaskHandle=HASH(0x130dcd48)
# Fri Mar 25 17:04:29 2011 (Thread 2) Padre::Wx::Role::Conduit::signal 'Padre::Wx::Role::Conduit'
# Fri Mar 25 17:04:29 2011 Padre::Wx::Role::Conduit::on_signal Wx::PlThreadEvent=SCALAR(0x169eb938)
# Fri Mar 25 17:04:29 2011 Padre::TaskManager::on_signal Padre::TaskManager=HASH(0xade2ae0)
# Fri Mar 25 17:04:29 2011 Padre::TaskHandle::idle_time Padre::TaskHandle=HASH(0x16a36e40)
# Fri Mar 25 17:04:29 2011 Padre::TaskHandle::on_message Padre::TaskHandle=HASH(0x16a36e40)
# Fri Mar 25 17:04:29 2011 Padre::Role::Task::task_owner 'Padre::Role::Task'
# Fri Mar 25 17:04:29 2011 Padre::Wx::Directory::browse_message Padre::Wx::Directory=HASH(0xabc6fd0)
[ many repetitions of the last 6 lines ]
# Fri Mar 25 17:04:33 2011 (Thread 2) Padre::TaskHandle::message Padre::TaskHandle=HASH(0x130dcd48)
# Fri Mar 25 17:04:33 2011 (Thread 2) Padre::Wx::Role::Conduit::signal 'Padre::Wx::Role::Conduit'
[ last 2 lines repeated many times per second ]
# Fri Mar 25 17:04:38 2011 (Thread 2) Padre::TaskHandle::message Padre::TaskHandle=HASH(0x130dcd48)
# Fri Mar 25 17:04:38 2011 (Thread 2) Padre::Wx::Role::Conduit::signal 'Padre::Wx::Role::Conduit'
# Fri Mar 25 17:04:38 2011 (Thread 2) (eval) 'Calling ->stopped'
# Fri Mar 25 17:04:38 2011 (Thread 2) Padre::TaskHandle::stopped Padre::TaskHandle=HASH(0x130dcd48)
# Fri Mar 25 17:04:38 2011 (Thread 2) Padre::TaskHandle::message Padre::TaskHandle=HASH(0x130dcd48)
# Fri Mar 25 17:04:38 2011 (Thread 2) Padre::Wx::Role::Conduit::signal 'Padre::Wx::Role::Conduit'
*** FREEZE ***

comment:4 Changed 3 years ago by Sewi

Update:
This time my console was spammed with

   Something is wrong as one of the directory objects is undef at .../Padre/lib/Padre/Wx/Directory.pm line 516.

It's this line: http://padre.perlide.org/trac/browser/trunk/Padre/lib/Padre/Wx/Directory.pm?rev=13977#L516

The next is now a last (r14226) but this still doesn't solve the problem.

comment:5 Changed 3 years ago by bowtie

Padre Info Message.

The directory browser got an undef object and may stop working now. Please save your work and restart Padre.

Term output

Use of uninitialized value $chd in concatenation (.) or string at /usr/src/Padre/Padre/lib/Padre/Wx/Directory.pm line 556.
Something is wrong as one of the directory objects is undef (position=1, child=Wx::TreeItemId=SCALAR(0x106fdaf0), chd=) at /usr/src/Padre/Padre/lib/Padre/Wx/Directory.pm line 556.

Adding here as redirected by #1255

I think this is related to a project dir, not containing padre.yml or having been built by by a method installer.

and the project browser, gets confused

comment:6 Changed 3 years ago by azawawi

Is this bug still valid?

Note: See TracTickets for help on using tickets.