Skip to content
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

Using #sync on Linux Alpine vm gives a primitiveFailed error #16500

Open
macta opened this issue Apr 21, 2024 · 0 comments
Open

Using #sync on Linux Alpine vm gives a primitiveFailed error #16500

macta opened this issue Apr 21, 2024 · 0 comments

Comments

@macta
Copy link
Contributor

macta commented Apr 21, 2024

Bug description
When trying to implement some server logging for a headless Pharo application I was having issues with not seeing the logged line before my error occured - Transcript show: 'msg'; flush. didn't work - and looking at the code for #flush, it suggests to use #sync after a flush to ensure the buffer is written out. When I tried to use ...flush; sync. I get a primitiveFailed error in an Ubuntu docker image.

To Reproduce
Steps to reproduce the behavior:

  1. Take the latest BA Docker image (https://github.com/ba-st/docker-pharo-runtime)
  2. Create a HelloWorld class in Pharo that logs some output to the transcript and create a method #flushSync on NonInteractiveTranscript, that does "self critical: [ (self stream) flush; sync ], then log some output like Transcript cr; show: 'Hello'; flushSync.
  3. Run the pharo image in headless mode and call your HelloWorld class (to get output to stdio)
  4. You will get a walkback error

Expected behavior
You shouldn't get a primitive failed error.

Note - it turns out that to get reliable log output it seems that the magic trick is to do : Transcript show: 'xxx'; cr; flush.

I also wonder if the comment for flush/sync should be updated, as I'm not sure its correct.

Screenshots
IMG_0169

Version information:

  • OS: [e.g. iOS] Alpine Linux v3
  • Version: [e.g. 1.6.1]
  • Pharo Version [e.g 9] 11

Expected development cost
As you know nothing happens magically, so do you have an idea of the development effort required?
In addition, are you willing to help because after all Pharo is yours too?

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant