You ever just add debug logs to the #Python standard library because it doesn’t have logs where they’re needed? :blobfoxgooglycry:
(I’m working with a heavily multi-processed program so pdb won’t do shit.)
You ever just add debug logs to the #Python standard library because it doesn’t have logs where they’re needed? :blobfoxgooglycry:
(I’m working with a heavily multi-processed program so pdb won’t do shit.)
I think I can fix it by using a Unix datagram socket to forward the logs to the logger thread, rather than trying to get multiprocessing.Queue to be inherited by child processes and their child processes. When I got rid of the latter logging approach, it stopped getting stuck. :blobfoxgooglytrash:
All of this because of the #GIL. :blobfoxangrylaugh: #Python
@mr64bit I’m using the spawn context, though.
Never, ever, use the fork context in multiprocessing. :blobfoxsweating: POSIX OSes (aside from macOS) have that as the default. :blobfoxangrylaugh: Always use the spawn context! :blobfoxdead:
Of course, unless you have an extreme edge case. :blobfoxgoogly: (Yes, the names are funny. :blobfoxgooglytrash: )
I feel so dead inside after learning that the hard way. :blobfoxdeadinside:
Signs:
Here are some faulthandler outputs. I couldn’t make heads or tails of the first one (fork), and went so far as to write my own home-grown version of it, which suffered the same fate anyway! :blobfoxupsidedowndizzy: The second one looks like it makes sense, so now I can actually track down what I think is a deadlock. :blobfoxthonking: :blobfoxthumbsup:
You ever just write your own scheduling algorithm? :blobfoxgoogly: #Python #programming
I think I might be running into some queue blocking in concurrent.futures.submit(), but there’s no way to change the behavior. :blobfoxgooglycry: #Python
What an adventure.
:blobfoxgoogly: (:blobfoxdeadinside:) #Python
:blobfoxsweating:
[2024-09-24 14:03:55,126] [INFO] [SpawnProcess-2:4(32637)] [MainThread] [_digest.py:66] [log_digest] [/]: shitposter.club.tar.zstd (475.64 GB) = 0079ff5ea1250caba488c4056717b74a299fafd67c8e220508aff222cdd32721113c2020f44f9fe7b20f395430cc73c5f0aa5170f5fd5a94144ce01e769b1929 (0:34:02.450908):blobfoxowo: #Kotlin
public fun getDigest(group: String, file: String): String? { return executePreparedStatement(SQL_QUERIES.q("get-digest")) { statement -> statement.setString(1, group) statement.setString(2, file) statement.executeQuery().use { resultSet -> if (!resultSet.next()) throw NoSuchElementException("No digest for group=${group}, file=${file}") resultSet.getString("digest") } } }GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.