Comments (14)
Please give a patch, or a git branch access.
Stéphane
Le 7 janv. 2015 à 14:43, AlexandruCostache [email protected] a écrit :
If the client uses up almost all of its virtual memory jack may crash it in common/JackShmMem.h:
The destructor for JackShmReadWritePtr is called although Init() failed and it will call GetShmAddress()->UnlockMemory();
The fastest sollution that solved my issue was to add another flag member, initDone and set it to TRUE in Init() right after locking memory so that GetShmAddress()->UnlockMemory() doesn't do an illegal access.
I'm not familiar with jackd so I'm asking: is this approach acceptable/safe or is there a better way to handle this mmap() failure?
—
Reply to this email directly or view it on GitHub.
from jack2.
Sure, here it is: https://www.dropbox.com/s/5qv5dr938c54d8q/0001-Avoid-crashing-client-when-mmap-fails.patch?dl=0
from jack2.
Le 7 janv. 2015 à 14:43, AlexandruCostache [email protected] a écrit :
If the client uses up almost all of its virtual memory jack may crash it in common/JackShmMem.h:
-
Does "Init" really crash or does it call " throw std::bad_alloc();" ?
-
or does it crash in GetShmAddress()->LockMemory() ?
The destructor for JackShmReadWritePtr is called although Init() failed and it will call GetShmAddress()->UnlockMemory();
The fastest sollution that solved my issue was to add another flag member, initDone and set it to TRUE in Init() right after locking memory so that GetShmAddress()->UnlockMemory() doesn't do an illegal access.
I'm not familiar with jackd so I'm asking: is this approach acceptable/safe or is there a better way to handle this mmap() failure?
Stéphane=
from jack2.
Crashes in destructor, ~JackShmReadWritePtr(), to be more specific in GetShmAddress()->UnlockMemory()
from jack2.
GetShmAddress() does not yeld a valid address because Init() failed previously. If JackShmReadWritePtr in not used for iterators then that patch should do just fine.
from jack2.
No the question is : how the call to Init fails in the first place? where in the code of Init does it fails ? (calling throw std::bad_alloc(), or chasing in GetShmAddress()->LockMemory();)
Thanks
Stéphane
Le 7 janv. 2015 à 15:24, AlexandruCostache [email protected] a écrit :
Crashes in destructor, ~JackShmReadWritePtr(), to be more specific in GetShmAddress()->UnlockMemory()
—
Reply to this email directly or view it on GitHub.
from jack2.
It failed trough bad_alloc
from jack2.
Could you possibly try the bit more general patch here :
Stéphane
Le 7 janv. 2015 à 15:34, AlexandruCostache [email protected] a écrit :
It failed trough bad_alloc
—
Reply to this email directly or view it on GitHub.
from jack2.
I'm not seeing the patch, looks like the link doesn't appear. Can you please post it again?
from jack2.
Give me your direct mail address.
Stéphane
Le 7 janv. 2015 à 15:54, AlexandruCostache [email protected] a écrit :
I'm not seeing the patch, looks like the link doesn't appear
—
Reply to this email directly or view it on GitHub.
from jack2.
It's the one in the patch I've provided. Not posting it here due to spamming considerations. Thanks
from jack2.
Took it for a spin and it behaves ok - the same.
from jack2.
Thanks commited and pushed on go.
Stéphane
Le 7 janv. 2015 à 16:51, AlexandruCostache [email protected] a écrit :
Took it for a spin and it behaves ok
—
Reply to this email directly or view it on GitHub.
from jack2.
Thank you!
from jack2.
Related Issues (20)
- JackLockedEngine.h: internal compiler error: in objc_eh_runtime_type, at objc/objc-next-runtime-abi-01.cc HOT 9
- JACK protocol mismatch (8 vs 9) when using a 32bit client and a 64bit server HOT 6
- Call to jack_deactivate() eventually doesn't return (Windows)
- Problem with JACK over network on Win10
- QjackCtl.app crashes on Darwin, depsite jack2 installed via pkgsrc
- Jack2 on Ventura (13.5) - no input signal HOT 9
- Jack2 not starting with Behringer UMC 204HD (U192k) via ALSA driver HOT 1
- `semget` is broken on non-macOS Darwin HOT 1
- jackd fails to work on Raspberry Pi & HiFiBerry DAC+ ADC Pro HOT 2
- Jackdbus wakes up every 200ms
- Crash on client creation/tear down
- Add support of internal sample rate to ALSA driver
- Could not load net manager, intclient = 0 status = 0x41
- Errors when recording from `type multi` ALSA PCM device
- Jack dbus requests device release, but does not wait for it to be released HOT 1
- Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. HOT 2
- jack-dbus delays shutdown when dbus-broker-units (systemd) are in use HOT 2
- MIDI jitter on macos
- Could it be possible to get a new release soon? HOT 1
- Missleading error message in combination with Portaudio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jack2.