Skip to content

Conversation

@samfreund
Copy link
Member

@samfreund samfreund commented Oct 31, 2025

Description

Needs to be tested on SC.

Running on SystemCore is bad, as PV tends to be a resource hog. Additionally, if issues arise, it can cause major problems. We want to ensure that a team has to intentionally take actions in order to run PV on SC, thus we serve a static webpage informing teams that SC isn't supported and exit.

image

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added

@samfreund samfreund requested a review from a team as a code owner October 31, 2025 23:46
@github-actions github-actions bot added documentation Anything relating to https://docs.photonvision.org backend Things relating to photon-core and photon-server labels Oct 31, 2025
@samfreund samfreund marked this pull request as draft October 31, 2025 23:49
}

// Exit
System.exit(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • you never call javelin.serve
  • you must let javalin live to be a web server. You can't exit...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you never call javelin.serve

app = io.javalin.Javalin.create(cfg -> cfg.showJavalinBanner = false).start(port);

This is functionally equivalent, it does the same thing and serves it.

you must let javalin live to be a web server. You can't exit...

We suspend the process, the exit is only there if something in the webserver fails.

@samfreund
Copy link
Member Author

[2025-10-31 19:37:30] [General - Main] [INFO] Starting PhotonVision version dev-v2025.3.2-48-g9519bbae on platform Linux x64
[2025-10-31 19:37:30] [General - Main] [ERROR] SystemCore is not a supported platform for PhotonVision!
Please visit https://docs.photonvision.org/en/latest/docs/quick-start/common-setups.html#systemcore-support for more information.
[main] INFO io.javalin.Javalin - Starting Javalin ...
[main] INFO org.eclipse.jetty.server.Server - jetty-11.0.15; built: 2023-04-11T18:37:53.775Z; git: 5bc5e562c8d05c5862505aebe5cf83a61bdbcb96; jvm 17.0.16+8-Ubuntu-0ubuntu122.04.1
[main] INFO org.eclipse.jetty.server.session.DefaultSessionIdManager - Session workerName=node0
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started i.j.j.@1afd44cb{/,null,AVAILABLE}
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@2f8f5f62{HTTP/1.1, (http/1.1)}{0.0.0.0:5800}
[main] INFO org.eclipse.jetty.server.Server - Started Server@2bbaf4f0{STARTING}[11.0.15,sto=0] @193ms
[main] INFO io.javalin.Javalin - Listening on http://localhost:5800/
[main] INFO io.javalin.Javalin - You are running Javalin 5.6.2 (released July 31, 2023. Your Javalin version is 823 days old. Consider checking for a newer version.).
[main] INFO io.javalin.Javalin - Javalin started in 108ms \o/
[2025-10-31 19:37:30] [General - Main] [INFO] Served SystemCore warning page on port 5800 - process will remain running to serve the page.
^CCommand exited with non-zero status 130
   Command being timed: "java -jar photonvision-dev-v2025.3.2-48-g9519bbae-linuxx64.jar"
   User time (seconds): 0.51
   System time (seconds): 0.07
   Percent of CPU this job got: 2%
   Elapsed (wall clock) time (h:mm:ss or m:ss): 0:21.57
   Average shared text size (kbytes): 0
   Average unshared data size (kbytes): 0
   Average stack size (kbytes): 0
   Average total size (kbytes): 0
   Maximum resident set size (kbytes): 86140
   Average resident set size (kbytes): 0
   Major (requiring I/O) page faults: 0
   Minor (reclaiming a frame) page faults: 18657
   Voluntary context switches: 6507
   Involuntary context switches: 62
   Swaps: 0
   File system inputs: 0
   File system outputs: 72
   Socket messages sent: 0
   Socket messages received: 0
   Signals delivered: 0
   Page size (bytes): 4096
   Exit status: 130

For reference, this is the resources exiting takes on my system.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server documentation Anything relating to https://docs.photonvision.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants