Description

Log-in after account creation on MoinDesktop fails "No sucher user...". You have to shut down the standalone and start it again to get it work.

Steps to reproduce

  1. Create a new user account
  2. Try to lock in afterwards
  3. This fails
  4. Shut down MoinDektop

  5. Run it again
  6. Login is successfull now.

Example

Details

MoinMoin Version

MoinDesktop 1.5.5a-1, moin-1-6-main-7c58e8af1a97

OS and Version

XP Sp2

Python Version

Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32

Server Setup

Standalone Python

Server Details

FAT32

Language you are using the wiki in (set in the browser/UserPreferences)

Suaheli ;-) . But this doesn't matter..

Workaround

This seems to be some caching problem.... And indeed it was... Could fix this behaviour by some changes to getUserList in user.py:

   1 --- user_old.py	2006-12-06 20:17:28.000000000 +0100
   2 +++ user.py	2006-12-06 20:18:28.000000000 +0100
   3 @@ -27,9 +27,9 @@
   4      @rtype: list
   5      @return: all user IDs
   6      """
   7 -    import re, dircache
   8 +    import re, os
   9      user_re = re.compile(r'^\d+\.\d+(\.\d+)?$')
  10 -    files = dircache.listdir(request.cfg.user_dir)
  11 +    files = os.listdir(request.cfg.user_dir)
  12      userlist = [f for f in files if user_re.match(f)]
  13      return userlist
  14  
user_moin1-5-5-a-1.diff

-- OliverSiemoneit 2006-12-06 19:35:59

These are the few places where dircache is used instead of os in the code. Don't know in how far this is also prone to problems..

dircache.png

Discussion

AlexanderSchremmer has already confirmed this behaviour, could reproduce it though... But I don't know on which OS..

I guess we had that before, it is because FAT is slightly (?) broken. You should use NTFS on Windows for moin's data_dir.

-- OliverSiemoneit 2006-12-08 14:45:38 : Tested now on another machine with NTFS, XP Prof., Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32. Result: Still unable to log-in after account creation! So this is not because of broken FAT32... Is the use of dircache really needed? It's not widely used in code at all (see screenshot above).. Why not just drop dircache since it is prone to problems and replace it by just os?? This works fine. Don't think that this will kill performance rather some user's problems..

So to clear this: you can reproduce on NTFS and it reproduceably vanishes by using os. instead of dircache. and comes again when using dircache. ?

-- OliverSiemoneit 2006-12-08 21:55:54 : I did again some intense testing on NTFS. I can definitely reproduce it there: the problem vanishes when using os instead of dircache and comes again when I use dircache again!! Yes, this took me quite a long time to figure out why login is not successfull after account creation on DesktopEdition. I have tried all lot and in the end I came up to "getUserList" which is called form "getUserId". And "getUserList" is not notified about the changed dir list because auf dircache! This is not a Moin bug but some Python bug (only on Win??). So my suggestion is to simply drop dircache since it is no performance loss to have os here and os is not so prone to problems - at least on Win..

If it's dropped then please only for win DE is not the best testcase for a large productive wiki Does one have a slimpler testcase as MoinMoin? -- ReimarBauer 2006-12-09 07:57:16

The same problems occur also on moin-1-6-main-7c58e8af1a97 standalone. "os" fixes it. -- OliverSiemoneit 2006-12-10 17:43:27

Can someone reproduce this on Linux? And Mac OS? Can someone confirm Windows behaviour?

I played with dircache.dirlist() within the python interpreter on win32/ntfs and linux (both 2.4.3) and it seemed well-behaved. Strange.

Yes, the problem must be somewhere else since on one and the same maschine a normal Moin installation works correctly, MoinDesktop has the above mentioned problems. But changing "dircache" to "os" fixes it.. That's strange indeed. Often when I edit files with MoinDesktop and then click on "Save Changes" sometimes(only!) Moin tries to reload the page again and again (jumping between showing the page and a white screen) and it then comes up with the message "You have already saved the page" or the browser comes up with the message "Invalid page". Seems like some caching problem, too. I will check out, whether this is also a "dircache/os" issue - let's call the problem like that till we know the real reason for that behaviour.. -- OliverSiemoneit 2007-01-06 15:14:29

-- JanBredereke 2007-09-20 12:04:31 : I can confirm the bug on Windows XP Pro, with MoinDesktop moin-desktop-1.5.5a-1.exe . I stored both program and data on a network file system. The bug occurred immediately after installation. The only thing I did was to add the German language support. Stopping and starting the server worked around the problem.

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/LoginAfterAccountCreationFailsOnMoinDesktop (last edited 2007-10-29 19:20:38 by localhost)