Opened 2 months ago

Closed 2 months ago

#14339 closed bug (not reproducible)

clone_area: KDL to investigate

Reported by: korli Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

kenmays reported a KDL on hrev52194 gcc2 (and refused to report here), see: https://github.com/haikuports/haikuports/issues/2858#issuecomment-411488064

The clone_area call() is https://github.com/haiku/haiku/blob/master/src/kits/media/Buffer.cpp#L239

I doubt this was already resolved.

Attachments (1)

Change History (10)

comment:1 Changed 2 months ago by waddlesplash

It seems that buffers only make their way into the BufferManager via SERVER_REGISTER_BUFFER, and this is the only place which uses that command, so something must be adding a kernel buffer to BBuffer.

Since video plays just fine in WebPositive, it must be something MediaPlayer-specific. And indeed, it looks like MediaPlayer registers a buffer based on a BBitmap area: http://xref.plausible.coop/source/xref/haiku/src/apps/mediaplayer/media_node_framework/video/VideoConsumer.cpp#212

So that seems to imply BBitmaps are getting created in kernel space? That seems strange.

comment:2 Changed 2 months ago by waddlesplash

Oh, I see; it's probably due to B_BITMAP_WILL_OVERLAY.

comment:3 Changed 2 months ago by waddlesplash

It looks like the intel_extreme GART allocator, which is what allocate_overlay uses to get memory, does not set any protections at all: http://xref.plausible.coop/source/xref/haiku/src/add-ons/kernel/bus_managers/agp_gart/agp_gart.cpp#523

That usually means it gets B_READ_AREA | B_WRITE_AREA. So I suppose we need to set_area_protection(area_for(...)...) at the end of that function.

comment:4 Changed 2 months ago by korli

Strange, from the screenshot, "Audio Mixer control" would be the audio mixer thread http://xref.plausible.coop/source/xref/haiku/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp#105

comment:5 Changed 2 months ago by waddlesplash

I see that, but I don't know what else to say. I tested playing audio in MediaPlayer and video in WebPositive and both worked just fine (on VESA driver, no overlay.)

comment:6 Changed 2 months ago by waddlesplash

Hmm, it might be the HDA driver. I'll take a look.

comment:7 Changed 2 months ago by waddlesplash

Nope, the HDA driver works just fine here and doesn't trigger any panics. So I'll go try hardware overlays, then.

comment:8 Changed 2 months ago by waddlesplash

I can't find a way to reproduce this. If anyone else can, a syslog of the system before MediaPlayer was opened would be very helpful.

comment:9 Changed 2 months ago by korli

Resolution: not reproducible
Status: newclosed

thanks for the look.

Note: See TracTickets for help on using tickets.