All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] systemd: ignore qemu output, and check its return code
@ 2013-07-24  5:24 rongqing.li
  2013-07-24  5:24 ` [PATCH 1/1] " rongqing.li
  0 siblings, 1 reply; 12+ messages in thread
From: rongqing.li @ 2013-07-24  5:24 UTC (permalink / raw)
  To: openembedded-core

From: "Roy.Li" <rongqing.li@windriver.com>

The following changes since commit 8fc6904fe97438478119db6cd23b7b4eb33b50aa:

  curl: add upstream status to patch (2013-07-18 12:21:13 -0700)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib roy/systemd
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/systemd

Roy.Li (1):
  systemd: ignore qemu output, and check its return code

 meta/recipes-core/systemd/systemd_204.bb |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
1.7.10.4



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-07-24  5:24 [PATCH 0/1] systemd: ignore qemu output, and check its return code rongqing.li
@ 2013-07-24  5:24 ` rongqing.li
  2013-07-24  5:34   ` Khem Raj
  2013-08-07  7:30   ` Rongqing Li
  0 siblings, 2 replies; 12+ messages in thread
From: rongqing.li @ 2013-07-24  5:24 UTC (permalink / raw)
  To: openembedded-core

From: "Roy.Li" <rongqing.li@windriver.com>

qemu prints errors sometime, but it works well, the error information
can be captured by rpm, and lead to rpm failure. like:

	$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \
		-E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D
	qemu: Unsupported syscall: 240
	$echo $?
	$ 0

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 meta/recipes-core/systemd/systemd_204.bb |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_204.bb b/meta/recipes-core/systemd/systemd_204.bb
index b8b1290..10bde33 100644
--- a/meta/recipes-core/systemd/systemd_204.bb
+++ b/meta/recipes-core/systemd/systemd_204.bb
@@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300"
 pkg_postinst_udev-hwdb () {
 	if test -n "$D"; then
 		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
-			--root $D
+			--root $D 2>/dev/null
+
+		[ $? -ne 0 ] && exit 1
 	else
 		udevadm hwdb --update
 	fi
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-07-24  5:24 ` [PATCH 1/1] " rongqing.li
@ 2013-07-24  5:34   ` Khem Raj
  2013-07-24  6:15     ` Rongqing Li
  2013-08-07  7:30   ` Rongqing Li
  1 sibling, 1 reply; 12+ messages in thread
From: Khem Raj @ 2013-07-24  5:34 UTC (permalink / raw)
  To: rongqing.li; +Cc: openembedded-core


On Jul 23, 2013, at 10:24 PM, <rongqing.li@windriver.com> wrote:

> From: "Roy.Li" <rongqing.li@windriver.com>
> 
> qemu prints errors sometime, but it works well, the error information
> can be captured by rpm, and lead to rpm failure. like:
> 
> 	$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \
> 		-E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D
> 	qemu: Unsupported syscall: 240


hmm this is a qemu issue and I bet qemu is segfaulting
This should be fixed. Can you try porting 

http://lists.gnu.org/archive/html/qemu-devel/2010-02/msg00870.html

To qemu please ?

Then you won't need this patch.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-07-24  5:34   ` Khem Raj
@ 2013-07-24  6:15     ` Rongqing Li
  2013-07-26 11:53       ` Burton, Ross
  0 siblings, 1 reply; 12+ messages in thread
From: Rongqing Li @ 2013-07-24  6:15 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core



On 07/24/2013 01:34 PM, Khem Raj wrote:
>
> On Jul 23, 2013, at 10:24 PM, <rongqing.li@windriver.com> wrote:
>
>> From: "Roy.Li" <rongqing.li@windriver.com>
>>
>> qemu prints errors sometime, but it works well, the error information
>> can be captured by rpm, and lead to rpm failure. like:
>>
>> 	$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \
>> 		-E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D
>> 	qemu: Unsupported syscall: 240
>
>
> hmm this is a qemu issue and I bet qemu is segfaulting
> This should be fixed. Can you try porting
>

qemu is not segfaulting, except error message, it returns 0,
and udevadm hwdb finished its task.

> http://lists.gnu.org/archive/html/qemu-devel/2010-02/msg00870.html
>

why was this patch be not merged, it was submitted on 02/2010


-Roy
> To qemu please ?
>
> Then you won't need this patch.
>
>
>

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-07-24  6:15     ` Rongqing Li
@ 2013-07-26 11:53       ` Burton, Ross
  2013-08-05  5:21         ` Rongqing Li
  0 siblings, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2013-07-26 11:53 UTC (permalink / raw)
  To: Rongqing Li; +Cc: openembedded-core

On 24 July 2013 07:15, Rongqing Li <rongqing.li@windriver.com> wrote:
> qemu is not segfaulting, except error message, it returns 0,
> and udevadm hwdb finished its task.

A bit of googling takes you to
https://bugs.launchpad.net/ubuntu/+source/qemu-linaro/+bug/758424.
Key quote:

"We only implement the futex syscalls if CONFIG_USE_NPTL. This isn't
defined for the i386 target (the necessary support in target-i386 for
pushing atomic insns up to the linux-user top level loop isn't
implemented). The upshot is that running multithreaded programs in
linux-user i386-target isn't supported and this is just one of the
symptoms."

Not segfaulting != working when multithreaded programs don't have
futexs.  We'll be seeing this more in the future now that GLib assumes
you can thread.

Ross


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-07-26 11:53       ` Burton, Ross
@ 2013-08-05  5:21         ` Rongqing Li
  0 siblings, 0 replies; 12+ messages in thread
From: Rongqing Li @ 2013-08-05  5:21 UTC (permalink / raw)
  To: Burton, Ross; +Cc: openembedded-core



On 07/26/2013 07:53 PM, Burton, Ross wrote:
> On 24 July 2013 07:15, Rongqing Li <rongqing.li@windriver.com> wrote:
>> qemu is not segfaulting, except error message, it returns 0,
>> and udevadm hwdb finished its task.
>
> A bit of googling takes you to
> https://bugs.launchpad.net/ubuntu/+source/qemu-linaro/+bug/758424.
> Key quote:
>
> "We only implement the futex syscalls if CONFIG_USE_NPTL. This isn't
> defined for the i386 target (the necessary support in target-i386 for
> pushing atomic insns up to the linux-user top level loop isn't
> implemented). The upshot is that running multithreaded programs in
> linux-user i386-target isn't supported and this is just one of the
> symptoms."
>
> Not segfaulting != working when multithreaded programs don't have
> futexs.  We'll be seeing this more in the future now that GLib assumes
> you can thread.
>
> Ross
>


I see this bug was not fixed from 2011-11, what should I do?

I know my patch works well on my machine.

-Roy



-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-07-24  5:24 ` [PATCH 1/1] " rongqing.li
  2013-07-24  5:34   ` Khem Raj
@ 2013-08-07  7:30   ` Rongqing Li
  2013-08-07 11:55     ` Burton, Ross
  2013-08-07 18:26     ` Khem Raj
  1 sibling, 2 replies; 12+ messages in thread
From: Rongqing Li @ 2013-08-07  7:30 UTC (permalink / raw)
  To: rongqing.li; +Cc: openembedded-core

ping

On 07/24/2013 01:24 PM, rongqing.li@windriver.com wrote:
> From: "Roy.Li" <rongqing.li@windriver.com>
>
> qemu prints errors sometime, but it works well, the error information
> can be captured by rpm, and lead to rpm failure. like:
>
> 	$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \
> 		-E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D
> 	qemu: Unsupported syscall: 240
> 	$echo $?
> 	$ 0
>
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> ---
>   meta/recipes-core/systemd/systemd_204.bb |    4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/systemd/systemd_204.bb b/meta/recipes-core/systemd/systemd_204.bb
> index b8b1290..10bde33 100644
> --- a/meta/recipes-core/systemd/systemd_204.bb
> +++ b/meta/recipes-core/systemd/systemd_204.bb
> @@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300"
>   pkg_postinst_udev-hwdb () {
>   	if test -n "$D"; then
>   		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
> -			--root $D
> +			--root $D 2>/dev/null
> +
> +		[ $? -ne 0 ] && exit 1
>   	else
>   		udevadm hwdb --update
>   	fi
>

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-08-07  7:30   ` Rongqing Li
@ 2013-08-07 11:55     ` Burton, Ross
  2013-08-08  8:55       ` Rongqing Li
  2013-08-07 18:26     ` Khem Raj
  1 sibling, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2013-08-07 11:55 UTC (permalink / raw)
  To: Rongqing Li; +Cc: openembedded-core

On 7 August 2013 08:30, Rongqing Li <rongqing.li@windriver.com> wrote:
>>                 ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')}
>> hwdb --update \
>> -                       --root $D
>> +                       --root $D 2>/dev/null
>> +
>> +               [ $? -ne 0 ] && exit 1

The $? check can be removed replaced by set -e, as many postinst
scripts do already.

Why/where is the output from runqemu considered an error?  I wasn't
aware that logs were monitored for that error message.  I don't think
we should be hiding the output of runqemu as any real errors will also
be hidden.

Ross


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-08-07  7:30   ` Rongqing Li
  2013-08-07 11:55     ` Burton, Ross
@ 2013-08-07 18:26     ` Khem Raj
  2013-08-08  8:53       ` Rongqing Li
  1 sibling, 1 reply; 12+ messages in thread
From: Khem Raj @ 2013-08-07 18:26 UTC (permalink / raw)
  To: Rongqing Li; +Cc: openembedded-core


On Aug 7, 2013, at 12:30 AM, Rongqing Li <rongqing.li@windriver.com> wrote:

> ping
> 
> On 07/24/2013 01:24 PM, rongqing.li@windriver.com wrote:
>> From: "Roy.Li" <rongqing.li@windriver.com>
>> 
>> qemu prints errors sometime, but it works well,


how do you know ?

>> the error information
>> can be captured by rpm, and lead to rpm failure. like:
>> 
>> 	$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \
>> 		-E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D
>> 	qemu: Unsupported syscall: 240
>> 	$echo $?
>> 	$ 0
>> 
>> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
>> ---
>>  meta/recipes-core/systemd/systemd_204.bb |    4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/meta/recipes-core/systemd/systemd_204.bb b/meta/recipes-core/systemd/systemd_204.bb
>> index b8b1290..10bde33 100644
>> --- a/meta/recipes-core/systemd/systemd_204.bb
>> +++ b/meta/recipes-core/systemd/systemd_204.bb
>> @@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300"
>>  pkg_postinst_udev-hwdb () {
>>  	if test -n "$D"; then
>>  		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
>> -			--root $D
>> +			--root $D 2>/dev/null
>> +
>> +		[ $? -ne 0 ] && exit 1
>>  	else
>>  		udevadm hwdb --update
>>  	fi
>> 
> 
> -- 
> Best Reagrds,
> Roy | RongQing Li
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-08-07 18:26     ` Khem Raj
@ 2013-08-08  8:53       ` Rongqing Li
  0 siblings, 0 replies; 12+ messages in thread
From: Rongqing Li @ 2013-08-08  8:53 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core



On 08/08/2013 02:26 AM, Khem Raj wrote:
>
> On Aug 7, 2013, at 12:30 AM, Rongqing Li <rongqing.li@windriver.com> wrote:
>
>> ping
>>
>> On 07/24/2013 01:24 PM, rongqing.li@windriver.com wrote:
>>> From: "Roy.Li" <rongqing.li@windriver.com>
>>>
>>> qemu prints errors sometime, but it works well,
>
>
> how do you know ?
>

echo $? and output of "udevadm hwdb --update --root $D" shows
it works well.

-Roy


>>> the error information
>>> can be captured by rpm, and lead to rpm failure. like:
>>>
>>> 	$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \
>>> 		-E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D
>>> 	qemu: Unsupported syscall: 240
>>> 	$echo $?
>>> 	$ 0
>>>
>>> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
>>> ---
>>>   meta/recipes-core/systemd/systemd_204.bb |    4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-core/systemd/systemd_204.bb b/meta/recipes-core/systemd/systemd_204.bb
>>> index b8b1290..10bde33 100644
>>> --- a/meta/recipes-core/systemd/systemd_204.bb
>>> +++ b/meta/recipes-core/systemd/systemd_204.bb
>>> @@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300"
>>>   pkg_postinst_udev-hwdb () {
>>>   	if test -n "$D"; then
>>>   		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
>>> -			--root $D
>>> +			--root $D 2>/dev/null
>>> +
>>> +		[ $? -ne 0 ] && exit 1
>>>   	else
>>>   		udevadm hwdb --update
>>>   	fi
>>>
>>
>> --
>> Best Reagrds,
>> Roy | RongQing Li
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-08-07 11:55     ` Burton, Ross
@ 2013-08-08  8:55       ` Rongqing Li
  2013-08-08 10:57         ` Burton, Ross
  0 siblings, 1 reply; 12+ messages in thread
From: Rongqing Li @ 2013-08-08  8:55 UTC (permalink / raw)
  To: Burton, Ross; +Cc: openembedded-core



On 08/07/2013 07:55 PM, Burton, Ross wrote:
> On 7 August 2013 08:30, Rongqing Li <rongqing.li@windriver.com> wrote:
>>>                  ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')}
>>> hwdb --update \
>>> -                       --root $D
>>> +                       --root $D 2>/dev/null
>>> +
>>> +               [ $? -ne 0 ] && exit 1
>
> The $? check can be removed replaced by set -e, as many postinst
> scripts do already.
>
> Why/where is the output from runqemu considered an error?  I wasn't
> aware that logs were monitored for that error message.  I don't think
> we should be hiding the output of runqemu as any real errors will also
> be hidden.
>
> Ross


I always get the below on error on my machine(Ubuntu 12.10) when enable 
systemd:


|  102:Installing libnfsidmap0 
######################################## [ 26%]
|  103:Installing run-postinsts 
######################################## [ 26%]
| Output from run-postinsts-1.0-r9@i586:
| --
|  257:Installing liberation-fo.. 
######################################## [ 65%]
|  258:Installing glib-networking 
######################################## [ 65%]
|  259:Installing wpa-supplicant 
######################################## [ 66%]
|  260:Installing udev-hwdb 
######################################## [ 66%]
| Output from udev-hwdb-1:204-r0@i586:
| ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be 
preloaded: ignored.
| qemu: Unsupported syscall: 240
|  261:Installing udev 
######################################## [ 66%]
|  262:Installing util-linux-fsck 
######################################## [ 67%]
| Output from util-linux-fsck-2.23.2-r0@i586:
| update-alternatives: Linking 
/buildarea/build/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/rootfs//sbin/fsck.minix 
to /sbin/fsck.minix.util-linux
|
| ERROR: Function failed: do_rootfs (log file is located at 
/buildarea/build/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.26461)
ERROR: Task 7 
(/buildarea/build/poky/meta/recipes-sato/images/core-image-sato.bb, 
do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5548 tasks of which 924 didn't need to be 
rerun and 1 failed.
No currently running tasks (5547 of 5549)

Summary: 1 task failed:
   /buildarea/build/poky/meta/recipes-sato/images/core-image-sato.bb, 
do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.


After using the patch, it works well.


Other place used the same method to handle the qemu_run_binary result:


lirq@lirq-OptiPlex-780:/buildarea/build/poky/meta$ grep qemu_run_binary 
./ -r -A2
./classes/qemu.bbclass:# ${@qemu_run_binary(d, '$D', 
'/usr/bin/test_app')} [test_app arguments]
./classes/qemu.bbclass-#
./classes/qemu.bbclass:def qemu_run_binary(data, rootfs_path, binary):
./classes/qemu.bbclass-    qemu_binary = qemu_target_binary(data)
./classes/qemu.bbclass-    if qemu_binary == "qemu-allarch":
--
./classes/gtk-immodules-cache.bbclass:            ${@qemu_run_binary(d, 
'$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
./classes/gtk-immodules-cache.bbclass-                $IMFILES > 
$D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
./classes/gtk-immodules-cache.bbclass-                sed -i -e "s:$D::" 
$D/etc/gtk-$maj_ver.0/gtk.immodules
--
./classes/gtk-immodules-cache.bbclass:            ${@qemu_run_binary(d, 
'$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
./classes/gtk-immodules-cache.bbclass-                $IMFILES > 
$D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
./classes/gtk-immodules-cache.bbclass-                sed -i -e "s:$D::" 
$D/etc/gtk-$maj_ver.0/gtk.immodules
--
./recipes-graphics/pango/pango.inc:	${@qemu_run_binary(d, 
'$D','${bindir}/${MLPREFIX}pango-querymodules')} \
./recipes-graphics/pango/pango.inc-	 
$D${libdir}/pango/${LIBV}/modules/*.so \
./recipes-graphics/pango/pango.inc-		> 
$D${sysconfdir}/pango/${MLPREFIX}pango.modules 2>/dev/null



-Roy


>
>

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] systemd: ignore qemu output, and check its return code
  2013-08-08  8:55       ` Rongqing Li
@ 2013-08-08 10:57         ` Burton, Ross
  0 siblings, 0 replies; 12+ messages in thread
From: Burton, Ross @ 2013-08-08 10:57 UTC (permalink / raw)
  To: Rongqing Li; +Cc: openembedded-core

On 8 August 2013 09:55, Rongqing Li <rongqing.li@windriver.com> wrote:
> | ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded:
> ignored.

That's probably what's causing the problem, not the syscall warning.

It looks like https://bugzilla.yoctoproject.org/show_bug.cgi?id=4843
which is tricky to replicate, maybe you should speak to Peter about
your configuration so we can finally fix it.

Ross


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-08-08 10:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-24  5:24 [PATCH 0/1] systemd: ignore qemu output, and check its return code rongqing.li
2013-07-24  5:24 ` [PATCH 1/1] " rongqing.li
2013-07-24  5:34   ` Khem Raj
2013-07-24  6:15     ` Rongqing Li
2013-07-26 11:53       ` Burton, Ross
2013-08-05  5:21         ` Rongqing Li
2013-08-07  7:30   ` Rongqing Li
2013-08-07 11:55     ` Burton, Ross
2013-08-08  8:55       ` Rongqing Li
2013-08-08 10:57         ` Burton, Ross
2013-08-07 18:26     ` Khem Raj
2013-08-08  8:53       ` Rongqing Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.