Wednesday, 2024-07-10

opendevreviewDaniel Bengtsson proposed openstack/oslo-specs master: Use cotyledon and futurist.  https://review.opendev.org/c/openstack/oslo-specs/+/92259711:07
johnsomsean-k-mooney So I am looking into this "Second simultaneous read" issue caused by https://review.opendev.org/c/openstack/oslo.log/+/918426. I see that a number of nova services are having the same exceptions based on OpenSearch. For example: 15:25
johnsomhttps://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_6ca/889257/1/check/tempest-integrated-compute-enforce-scope-new-defaults/6cabc50/controller/logs/screen-n-sch.txt15:25
johnsomI am wondering if this isn't a bigger issue that may call for a revert.15:26
johnsomAnother here: https://9aca0d17822e3e334dca-b5c65296db2329c92cd45b6c6555ad39.ssl.cf1.rackcdn.com/919665/2/experimental/neutron-tempest-plugin-api-ovn-wsgi/505e29a/controller/logs/screen-n-cond-cell1.txt15:26
johnsomIt looks like there were 580 instances of this log message in the last 24 hours.15:28
sean-k-mooneyjohnsom: so nove has never depended on the debug feature16:22
sean-k-mooneyand i dont know of any useage of it intentioanly in nova16:22
johnsomRight, it is oslo logging16:22
sean-k-mooneyright16:22
johnsombasically, if you have two green threads, both of which use oslo logging, you are now going to get this exception.16:23
sean-k-mooneyyou really should not oslo is ment to handel that internally16:24
johnsomThat mutex hack in oslo logging triggers the multi-reader16:24
sean-k-mooneythe one form swift16:25
sean-k-mooneybut that was somethign that was revised as part fo removing the debug flag16:25
johnsomIn my case, it's using oslo service and the loopingcall from olso service16:25
sean-k-mooneyright that could happen on any service that has a perodic16:25
sean-k-mooneyor whwere we use spawn direclty16:25
sean-k-mooneyso it sound liek the tow optoins we have are reneable the debug feature maskign the problem or also revert the mutex lock change that added this behaiovr16:26
sean-k-mooneywhich would mean reverting https://github.com/openstack/oslo.log/commit/94b9dc32ec1f52a582adbd97fe2847f7c87d6c1716:28
johnsomYeah, agree. I am not sure if there is a better mutex lock implementation that would work or not. I'm not deeply into eventlet.16:28
sean-k-mooneywell the issue is the oen we used is a file level one using a pip and that involes sharing a file descriptor16:29
johnsomPersonally, I would leave the mutex lock patch as it fixes the threads things, but leave the ignore multiple reader setting until we get oslo service off eventlet16:29
sean-k-mooneythe way i imeplent this in bash 16:29
sean-k-mooneyis i use mkdir16:30
JayF> logging._lock = logging.threading.RLock()16:30
JayFthat is likely the breaky code since eventlet upgrades locks now16:30
sean-k-mooneyif you use mkdir to creat a directory and two try to do that at the same tiem only one will successed16:30
sean-k-mooneythat is the one that got the lock16:30
JayFI'm not 1000% sure; but reading that and knowing how new eventlet upgrades locks, it seems problematic16:30
sean-k-mooneyya i think the RLOCK is now a c module or somethign liek that16:31
sean-k-mooneythe file level interprocess lock might work16:31
johnsomYeah, I grumble wondering why it's not using posix locks16:32
sean-k-mooneyagain there you are not sharing a file descriptor or socket to hold the lock16:32
sean-k-mooneyok oslo.logging can use oslo.utils16:32
sean-k-mooneyand oslo.utils i belive has a lock we can use instead16:32
johnsomJayF The code looks like this now: https://github.com/openstack/oslo.log/blob/master/oslo_log/pipe_mutex.py16:33
sean-k-mooneyhum damb its in https://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/lockutils.py16:33
johnsomYeah, the question is if eventlet will just mockeypatch over that too and "do bad things"16:33
sean-k-mooneyno16:34
sean-k-mooneyif it did we are screwed16:34
sean-k-mooneyhttps://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/lockutils.py#L36516:34
sean-k-mooneyso the synchronized decorator is all we need 16:35
sean-k-mooneythat buils on fasteners.InterProcessLock16:36
sean-k-mooneyif its instasated with fair=true and external=true16:37
sean-k-mooneyits alos preseves fairness via a readerwriter lock internally16:37
sean-k-mooneyjohnsom: its how we do all locking between eventsls by defualt in nova16:38
*** haleyb is now known as haleyb|out22:50

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!