Author Topic: B3: SE Freeze with Smart Open, "Date Modified" and many files with similar names  (Read 6966 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
My beta 3 freezes when I do the following:

1) Have a project with at least 50 "*main.cc" that show up in Smart Open
2) Enable "Date Modified" column in Smart Open
3) type "main.cc" in Smart Open
4) Sort by Date Modified, click the column 2x to get the most recent file at the top.
5) Double-click on one of the main.cc files
6) The main.cc gets opened in the editor window, but then SE gets frozen, and need to kill it (kill -9 not needed, regular kill works) and restart it to use it again.
« Last Edit: September 06, 2017, 04:03:22 PM by rowbearto »

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
I can't reproduce this so far.  Any chance you could send me the project file so I can see the paths?

I've tried on windows and linux, with 50 files 00.main.cpp through 49.main.cpp.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
I uploaded the workspace (ec-lc.vpw) and project files to support.slickedit.com under "mainfreeze".

My configuration is also available in support.slickedit.com under "ifbrace".

Thanks for trying!

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
  • Can you reproduce this reliably?
  • Is it one file, or any file?
  • Do you see the file open before it locks up?
  • It only happens when you have the wildcard, correct?

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Quote
Can you reproduce this reliably?

Yes I can.

Quote
Is it one file, or any file?

Any of the files locks it up

Quote
Do you see the file open before it locks up?

Yes, I see it opens

Quote
It only happens when you have the wildcard, correct?

Did some more exploring, and it happens in other scenarios as well.

It froze once when I didn't even have a project, and was in my bin directory, I opened a file and it froze, another time it froze after I opened a file and tried to type a character in the smart open edit box. I have not fully characterized this error mode, I can't get it to repeat yet and have not figured out the pattern. Using main.cc and sorting by date modified with my project open, I can reproduce it every time.


Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Is this a regular local filesystem?

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
(was writing this response when you asked about local file system, see below, I think we are converging on an explanation)

Found another way to reliability reproduce this, I saved a core file with gdb when it occurs (beta 3, linux x64), and I also have a theory as to what is going on.

My other method of reproducing is to have "Date Modified" column enabled when I start SE and before I load my workspace.

Open my workspace, there is no freeze.

Type 1 character into the smart open edit box, and then SE freezes.

I attached with gdb and generated a core file, see: mainfreeze.7z at https://drive.google.com/file/d/0B7AlniF_4GyYSDBRNmRJOTFlMnM/view?usp=sharing

As I wrote about in another post - https://community.slickedit.com/index.php/topic,15553.msg59190.html#msg59190 :

Quote
I work in a Linux NIS/Clearcase environment. Certain directories (example: /vobs) take a very long time to list all the files. For example, if I type "/vobs" into smart open, SE freezes for a very long time while it tries to get a listing of all the files in /vobs. The same thing happens when I do "ls /vobs" at the command line. Even if I want to go to the directory /vobs/dir1/dir2, SE is frozen after /vobs for a long time, hurting productivity, even though I don't need a listing of the files there. My workaround is to usually type a junk character first, like s/vobs/dir1/dir2, then remove the "s".

So my theory as to what is happening is when I type 1 character into smart open edit box, SE is trying to scan the modification times of all the files, and as my source files are on the networked/slow clearcase file system, SE is doing all this scanning for modification times in the main thread and is freezing. I think I observed once if I waited long enough the freeze goes away. I also looked at the stack of the core file I sent and SE seems to be waiting to get a modification time:

Code: [Select]
(gdb) info stack
#0  0x00007fc1f6494eb5 in _lxstat () at /lib64/libc.so.6
#1  0x0000000001a52b04 in cmFindFile_Posix::statInfoToFindFileInfo(cmStringT<char, 1, 30> const&, cmStringT<char, 1, 30> const&, cmFindFileInfo&) ()
#2  0x0000000001a52d22 in cmFindFile_Posix::findFirst(cmStringT<char, 1, 30> const&, cmFindFileInfo&, cmFindFileFlags, long long) ()
#3  0x00000000018b7eb1 in cmFile::getFindFileInfo(cmStringT<char, 1, 30> const&, cmFindFileInfo&, cmFindFileFlags) ()
#4  0x00000000008d9fc9 in getInfoForCaption(cmStringT<char, 1, 30>, FLMFileInfo*) ()

One thing that may help, it seems to be mostly the "/vobs" directory that is slow to enumerate. But if I have a file in /vobs/dir1/dir2, that subdirectory is not slow (for example when I do "ls" at the prompt). So I wonder if SE is doing a scan of each directory in the chain? If so then the first scan of /vobs could cause the freezing for a while? Perhaps only scan the files that show up in the wildcard search, and not their parent directories?

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
A little off the beaten path, but why is /vobs/ slow, and /vobs/dir1/dir2/ not slow?

Even though the dates are on, it only happens when you open the file, correct?

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
I'm not fully sure why /vobs is slow while /vobs/dir1/dir2 is not slow. I think it may be something to do with clearcase where each directory under /vobs is a different clearcase "vob" (versioned object base), but I don't fully understand why. I am a user of clearcase here, I don't administrate it, that is done by our IT team and I don't have any control over it.

It doesn't just happen when I open the file. The coredump I sent you was from doing this:

Quote
My other method of reproducing is to have "Date Modified" column enabled when I start SE and before I load my workspace.

Open my workspace, there is no freeze.

Type 1 character into the smart open edit box, and then SE freezes.

So the file is not even opened yet, all I did was press a key in the smart open dialog and it froze. You can see this in the stack trace of the core dump:

Code: [Select]
#15 0x00007fc1fc13242a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
    at /home/rbresali/pen/slickedit/se_latest_beta_64/bin/libQtCore.so.4
#16 0x00007fc1fcb3d892 in QLineEdit::textChanged(QString const&) ()
    at /home/rbresali/pen/slickedit/se_latest_beta_64/bin/libQtGui.so.4
#17 0x00007fc1fcb3dc59 in  () at /home/rbresali/pen/slickedit/se_latest_beta_64/bin/libQtGui.so.4
#18 0x00007fc1fc13242a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
    at /home/rbresali/pen/slickedit/se_latest_beta_64/bin/libQtCore.so.4
#19 0x00007fc1fcd8d1c5 in QLineControl::textChanged(QString const&) ()
    at /home/rbresali/pen/slickedit/se_latest_beta_64/bin/libQtGui.so.4
#20 0x00007fc1fcb4326d in QLineControl::finishChange(int, bool, bool) ()
    at /home/rbresali/pen/slickedit/se_latest_beta_64/bin/libQtGui.so.4
#21 0x00000000005fa7aa in vsCtlTextBox::keyin(char const*, int) ()
#22 0x000000000077adb6 in dokey(unsigned int, int) ()
#23 0x000000000077aec0 in call_key_common(filewindow_t*, int, int, unsigned int, unsigned int, bool, unsigned char) ()
#24 0x000000000077b2e4 in vs_call_keya(filewindow_t*, int, int) ()
#25 0x0000000000601fc3 in vsCtlSlickCExecuteEvent ()

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
The files in my project are all under /vobs/<dir1> or /vobs/<dir2>, so my theory is that when I type a key SE tries to scan these files (under /vobs/<dir1> or /vobs/<dir2>) for dates and this is where it gets slowed down. /vobs/<dir1> and /vobs/<dir2> are not slow. If SE tries to scan /vobs without the subdirs, it could get slowed down.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
OK.

This shouldn't be a new problem, right?

Do you have time to bring it up and give it a few minutes and see if it finishes?  You could do it with a second instance.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Probably not a new problem, as it was beta I experimented by right clicking on the columns in smart open and saw date modified was there, didn't think to try that in earlier versions but I do see that this feature was there in V21 (don't know when it was introduced, I requested this feature in 2013 (https://community.slickedit.com/index.php/topic,14623.msg39053.html#msg39053) - but never actually checked if you added it until beta 3).

I will start a 2nd instance and see if it eventually unfreezes.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Thanks.  It's been there at least 3 versions.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Just discovered an interesting thing when opening my second instance.

I enabled "Date Modified", but I didn't choose to sort on it. Then opened my project and typed a key into the edit box. SE did NOT freeze.

After sorting on "Date Modified", then typing a key, then SE started freezing (I will wait for it)

So the issue is also related to whether "Date Modified" column is chosen for sort.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Just checked V21, issue is also there, but only when column for sorting is "Date Modified". If sorting on "Name", no freeze. Didn't try sorting on "Path".