Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: Luca Capra <luca.capra@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: GattManager1 RegisterApplication Segmentation fault
Date: Fri, 16 Aug 2019 11:32:48 +0200
Message-ID: <CAAB86tC9+3qLT+prjqK8us3QHVWDZaj5hvsF+_usd2f90ke=eQ@mail.gmail.com> (raw)

Good morning

I am using bluez 5.50 DBus interface to expose a custom service. Seems
things goes well from logs, but I receive a Segmentation fault after
the registration is complete.

sudo bluetoothd -E -d -n -P hostname
...
bluetoothd[22951]: src/gatt-database.c:manager_register_app()
Registering application: :1.2272:/org/bluez/hci0/app0
bluetoothd[22951]: src/gatt-database.c:proxy_added_cb() Object
received: /org/bluez/hci0/app0/service_000003e8, iface:
org.bluez.GattService1
bluetoothd[22951]: src/gatt-database.c:include_services() path
/org/bluez/hci0/app0
bluetoothd[22951]: include service not found
bluetoothd[22951]: src/gatt-database.c:include_services() path
/org/bluez/hci0/app0
bluetoothd[22951]: include service not found
bluetoothd[22951]: src/gatt-database.c:gatt_db_service_added() GATT
Service added to local database
bluetoothd[22951]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[22951]: src/sdpd-service.c:add_record_to_server() Adding
record with handle 0x1001b
bluetoothd[22951]: src/sdpd-service.c:add_record_to_server() Record
pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[22951]: src/sdpd-service.c:add_record_to_server() Record
pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[22951]: src/sdpd-service.c:add_record_to_server() Record
pattern UUID 000003e8-0001-1000-8000-00805f9
bluetoothd[22951]: src/sdpd-service.c:add_record_to_server() Record
pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[22951]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[22951]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[22951]: src/gatt-database.c:client_ready_cb() GATT
application registered: :1.2272:/org/bluez/hci0/app0
Segmentation fault


As a side note, I am setting GattService1 `Includes` to the same
service UUID because bluetoothd would otherwise report an error
parsing the field if let empty or omitted.

bluetoothd[25818]: src/gatt-database.c:manager_register_app()
Registering application: :1.2291:/org/bluez/hci0/app0
bluetoothd[25818]: src/gatt-database.c:proxy_added_cb() Object
received: /org/bluez/hci0/app0/service_000003e8, iface:
org.bluez.GattService1
bluetoothd[25818]: Failed to read "Includes" property of service
bluetoothd[25818]: Failed to add service
bluetoothd[25818]: Failed to create GATT service entry in local database


Do you have a suggestion ?

Thank you
Kind regards

Luca

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAB86tC9+3qLT+prjqK8us3QHVWDZaj5hvsF+_usd2f90ke=eQ@mail.gmail.com' \
    --to=luca.capra@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox