-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notebook locking #2
Comments
comment:1
A thought: PIDs live in a fairly small space, so it might be worth doing some kind of check to verify that the process corresponding to the PID is a SAGE notebook process. Alternate approach: instead of just bailing, ask the user whether to continue (and remove the existing lock file), or quit. That puts the burden on the user instead of the programmer, but the results may be better. |
Rather than keep a PID, a more robust solution would be to write the URL to the notebook in the lockfile. Upon startup, the server would send a request to that URL -- if there's already a running server, just return. If we also stored the PID, we could attempt to kill nonresponsive servers. |
comment:3
One could end up with an NFS filesystem and notebooks running on distinct machines. If the port listened on is only a local one on machine A then sending a request from machine B will not confirm that the process is still running. This is a bad thing to happen, but not unlikely if someone has sage installed in their homedir and moves from machine A to machine B. |
comment:5
This was fixed decades ago! |
* Improve camera positioning for threejs * Changes to sagedoc, stopgap and superseded; one mass replacement * Another mass replacement * Another mass replacement * Another replacement * Another replacement * Remove comment numbers * Fix a couple of strays * trac ticket -> github issue * Change checksums back, fix meta-ticket * Another mass replacement * Another mass replacement * Another mass replacement * Manual fixes * Small replacement * Small replacement * Fix typo * Add github role to tox * add explicit formulas to documentation of WeierstrassIsomorphism * lift documentation from .__init__() to class and tweak * add doctest for #20847 * add .torsion_basis() method to EllipticCurve_finite_field * Revert "Remove comment numbers" This reverts commit 27cdf3e. * Revert changes to git_trac.rst * Switch :github: to :issue: * Switch from sage-prod to sage in attachment links * Change trac_number to issue_number * cross linked matrix method * Add construction of strongly regular digraph * A few manual fixes * Another automatic change * Undo a bunch of changes in the doc directory * Another fix * Try to fix sphinx problem * Move comment tag inside * allowing iterables as input * Fix code style * generalized fix * converting iterables * added is_supergreedy() function * implemented diff algo, for borderline cases * correcting function for disjoint set of points * correcting function * documentation changes * minor chagnges * fixing_failing_tests * minor documentation correction * Update linear_extensions.py * corrected TeX maths in docstrings * further fixes to supergreedy docstring * Added Reference * adding reference * minor updates * correcting documentation errors * correct a wrong change to :trac: * remove spurrious blank line * another spurrious line removed * compute matrix kernels modulo composites * fix doctests * docstring style tweak * adding doctests * correct the import location (duh...) * adding colored permutation doctests * doctests fixes * replaced "Combining Caron"+c with one unicode character * Updated SageMath version to 10.0.beta1 --------- Co-authored-by: Kwankyu Lee <ekwankyu@gmail.com> Co-authored-by: David Roe <roed.math@gmail.com> Co-authored-by: Lorenz Panny <lorenz@yx7.cc> Co-authored-by: Marc Mezzarobba <marc@mezzarobba.net> Co-authored-by: Tobias Diez <code@tobiasdiez.com> Co-authored-by: Sandstorm831 <gargrohan138@gmail.com> Co-authored-by: Rohan Garg <76916164+Sandstorm831@users.noreply.github.com> Co-authored-by: Dima Pasechnik <dima@pasechnik.info> Co-authored-by: Release Manager <release@sagemath.org>
### 📚 Description Trac branch `u/gh-collares/gap-gc` from #34701, now migrated to GitHub. Currently based atop #35093; will rebase once that is merged. The rest of the description below is copied from #34701: A refactor in #27946 introduced "unprotected" (not surrounded by `GAP_Enter`/`GAP_Leave`) `GAP_ValueGlobalVariable` calls. I believe this might be a GC hazard, because after updating to GAP 4.12.1 I started seeing aarch64 crashes on NixOS infrastructure such as: ``` #0 0x0000fffff79740e8 in wait4 () #1 0x0000fffff5dc6b78 in print_enhanced_backtrace () #2 0x0000fffff5dc8190 in sigdie () #3 0x0000fffff5dcb1c0 in cysigs_signal_handler () #4 0x0000fffff7ffb7cc in __kernel_rt_sigreturn () #5 0x0000ffff99a0bf28 in ConvString () #6 0x0000000000000000 in ?? () #7 0x0000000000000000 in ?? () #8 0x0000000000000000 in ?? () #9 0x0000ffff99989930 in Pr () #10 0x0000ffff9998aa18 in CloseOutput () #11 0x0000ffff99884828 in capture_stdout () at /build/sage- src-9.7/pkgs/sagemath-standard/sage/libs/gap/element.pyx:154 ... ``` I also see cases where `capture_stdout` throws errors such as `sage.libs.gap.util.GAPError: Error, Length: <list> must be a list (not the integer 255)` and then crashes. Both types of errors are fixed by this ticket. Note that I am nesting `GAP_Enter`/`GAP_Leave` calls because I didn't remove the preexisting calls inside `capture_stdout`. That's because I feared removing the innermost calls might create a new footgun (and I believe nested `GAP_Enter`/`GAP_Leave` calls are explicitly supported), but removing them should cause no problem. Removing them might even be preferable for performance reasons, I don't know. Fixes #34701 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [x] I have linked an issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> - #35093: GAP 4.12.2 upgrade, which touches the same function and should land first. URL: #35114 Reported by: Mauricio Collares Reviewer(s): Dima Pasechnik
Update reference [HKL2021]: Appeared in 2022
Remove excessive blank lines around INPUT, OUTPUT, EXAMPLES, and before docstring ending """. (sagemath#2)
Add `# long time`s and cosmetics
Currently it is possible to run two SAGE notebooks on the same directory,
which is potentially VERY VERY bad. It would be better if when a SAGE
notebook server starts up it checks for the presence of a lock file. This
file would contain the pid of a running SAGE notebook process -- if the file
and that process exist, then the notebook won't start. When the notebook
finishes it should delete that lock file.
Component: notebook
Issue created by migration from https://trac.sagemath.org/ticket/2
The text was updated successfully, but these errors were encountered: