text:
[BUG] Trying to TRIM on 1.4.1: the discard operation is not supported

Describe the bug (🐛 if you encounter this issue)
I just upgraded from Longhorn Manager 1.2.4 to 1.4.1. The upgrade process was flawless. And upgrading the engine on the volumes was also done without any problems.
But i tried the new TRIM feature, since that was the reason I upgraded. But when I right click a volume, click "Trim Filesystem", it just says "Internal error".
I read the manual, and it said I could try to trim it manually by using fstrim. I tried that. I found my volume with df:
/dev/longhorn/pvc-1b8c696c-557d-4412-9e83-2b1dc910ad27                   -         -         -    - /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-1b8c696c-557d-4412-9e83-2b1dc910ad27/globalmount
/dev/longhorn/pvc-1b8c696c-557d-4412-9e83-2b1dc910ad27                   -         -         -    - /var/lib/kubelet/pods/f2c0ead1-5214-4b5e-9156-149a0f3a95fc/volumes/kubernetes.io~csi/pvc-1b8c696c-557d-4412-9e83-2b1dc910ad27/mount

So I tried:
fstrim /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-1b8c696c-557d-4412-9e83-2b1dc910ad27/globalmount
fstrim: /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-1b8c696c-557d-4412-9e83-2b1dc910ad27/globalmount: the discard operation is not supported

But it just says the discard operation is not supported. I tried both the mountpoints that df mentioned. Neither the "globalmount" or "mount" mountpoints accepts fstrim.
Maybe it is because the filesystems was created in < 1.4.0 (1.2.4)? But the documentation says only that you need to be running >1.4.0, not that it only works with new volumes created after the upgrade.
To Reproduce
Steps to reproduce the behavior:

Find a volume for trimming
Click on "Trim filesystem"
Click on "OK"
See error

Expected behavior
I would expect either the functionality to work. Or some informative error message if it is not possible with old volumes. And if so, it should be mentioned in the Prerequisites in the documentation for trim.
Environment

Longhorn version: 1.4.1
Installation method (e.g. Rancher Catalog App/Helm/Kubectl): Kubectl
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: RKE

Number of management node in the cluster: 3
Number of worker node in the cluster: 3

Node config

OS type and version: Ubuntu 20.04.3 LTS
CPU per node: 1 cpu, 6 cores, (12 if you include ht)
Memory per node: 64GB
Disk type(e.g. SSD/NVMe): SSD
Network bandwidth between the nodes: 10GE

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): Baremetal
Number of Longhorn volumes in the cluster: 61

Please check the concern of the discard mentioned in the doc.
If you want to enable to discard, you can add the discard the storageclass's mount options in the doc.

@derekbit Yes, I have read the doc about trim/discard. Thats the doc I was referring to. I don't feel that it says anything about my issue. I am not even using snapshots at the moment on this volume.
Do you manually need to add the discard mount option to be able to use this new feature? According to the documentation, it seems to be enough to be at version 1.4.0 or higher? But it also says that it would only trim the head unless you enable the extra "remove snapshots" option.

@derekbit Yes, I have read the doc about trim/discard. Thats the doc I was referring to. I don't feel that it says anything about my issue. I am not even using snapshots at the moment on this volume.
Do you manually need to add the discard mount option to be able to use this new feature? According to the documentation, it seems to be enough to be at version 1.4.0 or higher? But it also says that it would only trim the head unless you enable the extra "remove snapshots" option.

I mean the failure is caused by the lack of discard option in the mount point. You can add discard in storageclass' mount options and see if it can work.

I will try with an updated StorageClass when I have resolved issue #5807 first. Since I am now unable to mount anything.

For anyone looking back at this issue. This was now solved.
Either because I was able to fix the issue with pods not being able to mount any volumes at all.
Or by adding the following to my longhorn storage classes:
mountOptions:
- discard

If the latter is the reason, it should maybe be mentioned in the doc, I think.

I have a similar problem after update from 1.3.1 to 1.4.1. When I try to do a trim I get the following error: unable to trim filesystem for volume pvc-06043a16-9bd2-4d1a-83ad-38841f4c4602: cannot find volume pvc-06043a16-9bd2-4d1a-83ad-38841f4c4602 mount info on host: failed to execute: nsenter [--mount=/host/proc/1/ns/mnt --net=/host/proc/1/ns/net fstrim /var/lib/kubelet/pods/7ed1a206-b91a-4cb1-9949-fcf4cf6ae1af/volume-subpaths/pvc-06043a16-9bd2-4d1a-83ad-38841f4c4602/postgres/0], output , stderr fstrim: /var/lib/kubelet/pods/7ed1a206-b91a-4cb1-9949-fcf4cf6ae1af/volume-subpaths/pvc-06043a16-9bd2-4d1a-83ad-38841f4c4602/postgres/0: the discard operation is not supported : exit status 1 Tried to add Storageclass "mountOptions:- discard", reattach volume, but no change. Can you please tell me how to solve this problem?

Have you tried trimming after reattaching the volumes?
https://github.com/longhorn/longhorn/issues/5203#issuecomment-1372015161

authors: c3y1huang derekbit haakonnessjoen

repo: longhorn/longhorn


text:
Ghosted on Security Report

Describe the bug
I started a responsible security disclosure back in February. Conversations proceeded reasonably and in late May, @achrinza informed me that a release to fix the issue was expected in roughly the following week.
In the roughly two months since, I have received no updates and no reply to my repeated requests for any updates on the issue.
I do not want to break from the responsible disclosure path, but being ghosted on this issue for nearly two months is becoming a major concern to me and my team.
I'm hoping this is just due to summer vacations or a misfiring spam filter or something like that, and that posting here will attract appropriate attention and resurrect the email thread to finish fixing this issue :crossed_fingers:
Logs
No response
Additional information
No response
Reproduction
https://github.com/loopbackio/loopback-next

Hi @mgabeler-lee-6rs, I have lined up the security advisory draft and the fix for review by the rest of the LoopBack Security Team. In addition, we're working to get a CVE. Unfortunately this will take a bit more time. I'd expect to be able to wrap everything up by the end of this week.
Thanks again for being patient with us as we work through the report.

Hi @mgabeler-lee-6rs, we are scheduling the following within the next 24-hours:

Patch release loopback-connector-postgresql@5.5.1
Public disclosure of vulnerability through GitHub, loopback.io, Slack, and mailing list

Credits on loopback.io will be given in accordance to what was discussed over email. Credits on the GitHub security advisory would be towards your GitHub account, @mgabeler-lee-6rs.
We're still working to get a CVE issued, but this is a non-blocker. I'll continue to post updates on the CVE here.
If there's any further inquiries, please don't hesitate to drop them here, through the email thread, or via Slack DM.

Thank you for the update :+1:

Hi @mgabeler-lee-6rs,
We've successfully published loopback-connector-postgresql@5.5.1 with the fix, and published the advisories:

https://groups.google.com/g/loopbackjs-security/c/nfjevbIKcDA
https://loopback.io/doc/en/sec/Security-advisory-08-06-2022.html
https://github.com/loopbackio/loopback-connector-postgresql/security/advisories/GHSA-j259-6c58-9m58
https://loopbackio.slack.com/archives/CE8CRBBFU/p1659754904703329
https://loopbackio.slack.com/archives/C03SLNUME59/p1659754914680269

The GitHub Security Advisory may not be immediately available while it's undergoing review. Once this and the CVE issuance is completed, we'll post an update here as well.
Thanks again for working with us through the security report. We'll take this as an opportunity to improve how we track and manage future reports.
If there's any further inquiries, please don't hesitate to drop them here, through the email thread, or via Slack DM.

Many thanks for completing this @achrinza.

Hi @mgabeler-lee-6rs, GitHub has reviewed and approved the security advisory for compliance with the CVE rules.
The GitHub Security Advisory will be published, and a CVE number has been issued:

https://github.com/advisories/GHSA-j259-6c58-9m58
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-35942

It may take some time for the changes to be reflected.

@achrinza I think I found a typo in the GH security alert: It mentions allowExtendedProperties, but I think that is meant to say allowExtendedOperators?

Thanks for bringing the typo up. I've went ahead and made the. hangers. It may take some time for it to be reflected.

source: gharchive/issue

repo: loopbackio/security

license: MIT

license_type: permissive

license_source: github-api


text:
Using training script

Hey, has anyone been able to use the training script? I tried both on my own data and on the images in the INPAINTING folder. I create a dataloader csv as described, but when running the model I get the following error.
Does anyone have pointers? Or at least a direction for me to look in, as the Python debugger is very unhappy when it starts going into the torch files.
I'd be thrilled at a reply :)
  File "-/ldm/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 443, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [128, 3, 3, 3], expected input[1, 512, 3, 512] to have 3 channels, but got 512 channels instead
None

###Full output:
python3 main_inpainting.py --train --name desktop --base configs/latent-diffusion/inpainting_training_dma_desktop.yaml --gpus 0, --seed 42
Global seed set to 42
[{'model': {'base_learning_rate': 0.0001, 'target': 'ldm.models.diffusion.ddpm.LatentInpaintDiffusion', 'params': {'linear_start': 0.0015, 'linear_end': 0.0205, 'num_timesteps_cond': 1, 'log_every_t': 100, 'timesteps': 1000, 'loss_type': 'l1', 'first_stage_key': 'image', 'cond_stage_key': 'masked_image', 'cond_stage_trainable': False, 'image_size': 128, 'channels': 3, 'concat_mode': True, 'monitor': 'val/loss', 'ckpt_path': 'models/ldm/inpainting_big/model_compvis.ckpt', 'scheduler_config': {'target': 'ldm.lr_scheduler.LambdaLinearScheduler', 'params': {'warm_up_steps': [10000], 'cycle_lengths': [10000000000000], 'f_start': [1e-06], 'f_max': [1.0], 'f_min': [1.0]}}, 'unet_config': {'target': 'ldm.modules.diffusionmodules.openaimodel.UNetModel', 'params': {'image_size': 64, 'in_channels': 7, 'out_channels': 3, 'model_channels': 256, 'attention_resolutions': [8, 4, 2], 'num_res_blocks': 2, 'channel_mult': [1, 2, 3, 4], 'num_heads': 8, 'resblock_updown': True, 'use_checkpoint': True}}, 'first_stage_config': {'target': 'ldm.models.autoencoder.VQModelInterface', 'params': {'embed_dim': 3, 'n_embed': 8192, 'monitor': 'val/rec_loss', 'ddconfig': {'attn_type': 'none', 'double_z': False, 'z_channels': 3, 'resolution': 256, 'in_channels': 3, 'out_ch': 3, 'ch': 128, 'ch_mult': [1, 2, 4], 'num_res_blocks': 2, 'attn_resolutions': [], 'dropout': 0.0}, 'lossconfig': {'target': 'torch.nn.Identity'}}}, 'cond_stage_config': '__is_first_stage__'}}, 'data': {'target': 'main_inpainting.DataModuleFromConfig', 'params': {'batch_size': 2, 'num_workers': 1, 'wrap': False, 'train': {'target': 'ldm.data.inpainting.InpaintingTrain', 'params': {'csv_file': 'desktop_data.csv', 'data_root': 'data/INPAINTING/custom_inpainting', 'size': 512}}, 'validation': {'target': 'ldm.data.inpainting.InpaintingValidation', 'params': {'csv_file': 'desktop_data.csv', 'data_root': 'data/INPAINTING/custom_inpainting', 'size': 512}}}}, 'lightning': {'find_unused_parameters': False, 'callbacks': {'image_logger': {'target': 'main_inpainting.ImageLogger', 'params': {'disabled': False, 'batch_frequency': 750, 'max_images': 4, 'increase_log_steps': True, 'log_first_step': True, 'log_images_kwargs': {'use_ema_scope': False, 'plot_progressive_rows': True, 'plot_diffusion_rows': True, 'N': 4, 'unconditional_guidance_scale': 1.0, 'unconditional_guidance_label': [''], 'ddim_steps': 50, 'ddim_eta': 0.0}}}}}}]
Running on GPUs 0,
LatentInpaintDiffusion: Running in eps-prediction mode
DiffusionWrapper has 387.25 M params.
Keeping EMAs of 418.
making attention of type 'none' with 512 in_channels
Working with z of shape (1, 3, 64, 64) = 12288 dimensions.
making attention of type 'none' with 512 in_channels
Using first stage also as cond stage.
modifying key 'model.diffusion_model.input_blocks.0.0.weight' and keeping its original 7 (channels) dimensions only
modifying key 'model.diffusion_model.input_blocks.0.0.weight' and keeping its original 7 (channels) dimensions only
Restored from models/ldm/inpainting_big/model_compvis.ckpt with 0 missing and 4 unexpected keys
Unexpected Keys: ['ddim_sigmas', 'ddim_alphas', 'ddim_alphas_prev', 'ddim_sqrt_one_minus_alphas']
Monitoring val/loss as checkpoint metric.
Merged modelckpt-cfg:
{'target': 'pytorch_lightning.callbacks.ModelCheckpoint', 'params': {'dirpath': 'logs/2023-02-08_desktop/checkpoints', 'filename': '{epoch:06}', 'mode': 'min', 'verbose': True, 'save_last': True, 'monitor': 'val/loss', 'save_top_k': 1}}
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
#### Data #####
train, InpaintingTrain, 1
validation, InpaintingValidation, 1
accumulate_grad_batches = 1
++++ NOT USING LR SCALING ++++
Setting learning rate to 1.00e-04
Global seed set to 42
initializing ddp: GLOBAL_RANK: 0, MEMBER: 1/1
----------------------------------------------------------------------------------------------------
distributed_backend=nccl
All DDP processes registered. Starting ddp with 1 processes
----------------------------------------------------------------------------------------------------

-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/core/datamodule.py:423: LightningDeprecationWarning: DataModule.setup has already been called, so it will not be called again. In v1.6 this behavior will change to always call DataModule.setup.
  rank_zero_deprecation(
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
Setting up LambdaLR scheduler...
Lightning config
find_unused_parameters: false
callbacks:
  image_logger:
    target: main_inpainting.ImageLogger
    params:
      disabled: false
      batch_frequency: 750
      max_images: 4
      increase_log_steps: true
      log_first_step: true
      log_images_kwargs:
        use_ema_scope: false
        plot_progressive_rows: true
        plot_diffusion_rows: true
        'N': 4
        unconditional_guidance_scale: 1.0
        unconditional_guidance_label:
        - ''
        ddim_steps: 50
        ddim_eta: 0.0
trainer:
  accelerator: ddp
  deterministic: true
  gpus: 0,

  | Name              | Type             | Params
-------------------------------------------------------
0 | model             | DiffusionWrapper | 387 M
1 | model_ema         | LitEma           | 0
2 | first_stage_model | VQModelInterface | 53.2 M
-------------------------------------------------------
387 M     Trainable params
53.2 M    Non-trainable params
440 M     Total params
1,761.861 Total estimated model params size (MB)
Validation sanity check: 0it [00:00, ?it/s]-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/trainer/data_loading.py:105: UserWarning: The dataloader, val dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 64 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
Validation sanity check:   0%|                                                                                | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
  File "main_inpainting.py", line 707, in <module>
    trainer.fit(model, data)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 553, in fit
    self._run(model)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 918, in _run
    self._dispatch()
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 986, in _dispatch
    self.accelerator.start_training(self)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 92, in start_training
    self.training_type_plugin.start_training(trainer)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 161, in start_training
    self._results = trainer.run_stage()
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 996, in run_stage
    return self._run_train()
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1031, in _run_train
    self._run_sanity_check(self.lightning_module)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1115, in _run_sanity_check
    self._evaluation_loop.run()
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/loops/base.py", line 111, in run
    self.advance(*args, **kwargs)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 110, in advance
    dl_outputs = self.epoch_loop.run(
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/loops/base.py", line 111, in run
    self.advance(*args, **kwargs)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 110, in advance
    output = self.evaluation_step(batch, batch_idx, dataloader_idx)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 154, in evaluation_step
    output = self.trainer.accelerator.validation_step(step_kwargs)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 211, in validation_step
    return self.training_type_plugin.validation_step(*step_kwargs.values())
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/ddp.py", line 386, in validation_step
    return self.model(*args, **kwargs)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 963, in forward
    output = self.module(*inputs[0], **kwargs[0])
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/pytorch_lightning/overrides/base.py", line 93, in forward
    output = self.module.validation_step(*inputs, **kwargs)
  File -/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "-/stable-diffusion_custom_inpaint/ldm/models/diffusion/ddpm.py", line 378, in validation_step
    _, loss_dict_no_ema = self.shared_step(batch)
  File "-/stable-diffusion_custom_inpaint/ldm/models/diffusion/ddpm.py", line 888, in shared_step
    x, c = self.get_input(batch, self.first_stage_key)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "-/stable-diffusion_custom_inpaint/ldm/models/diffusion/ddpm.py", line 1539, in get_input
    z, c, x, xrec, xc = super().get_input(batch, self.first_stage_key, return_first_stage_outputs=True,
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "-/stable-diffusion_custom_inpaint/ldm/models/diffusion/ddpm.py", line 682, in get_input
    encoder_posterior = self.encode_first_stage(x)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "-/stable-diffusion_custom_inpaint/ldm/models/diffusion/ddpm.py", line 885, in encode_first_stage
    return self.first_stage_model.encode(x)
  File "-/stable-diffusion_custom_inpaint/ldm/models/autoencoder.py", line 270, in encode
    h = self.encoder(x)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "-/stable-diffusion_custom_inpaint/ldm/modules/diffusionmodules/model.py", line 441, in forward
    hs = [self.conv_in(x)]
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 447, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "-/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 443, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [128, 3, 3, 3], expected input[1, 512, 3, 512] to have 3 channels, but got 512 channels instead
None

And the config I am using, though it's just the reference file with the directories changed:
model:
  # base_learning_rate: 1.0e-06
  base_learning_rate: 1.0e-04

  target: ldm.models.diffusion.ddpm.LatentInpaintDiffusion
  params:
    linear_start: 0.0015
    linear_end: 0.0205
    num_timesteps_cond: 1
    log_every_t: 100
    timesteps: 1000 # per overfittare tutti i livelli di rumore almeno 500 epoche
    loss_type: l1
    first_stage_key: image
    cond_stage_key: masked_image # 4 channels
    cond_stage_trainable: false
    # image_size: 64 # feature map size
    # QUESTO DECIDE LA SIZE DEL RUMORE, QUA E' NECESSARIA METTERLA A 128 PERCHE' IN INFERENCE NORMALE NON VIENE UTILIZZATA MA DAL LOGGER SI
    image_size: 128 # feature map size for 512 ---> l'hanno lasciata a 64 perchè loro hanno addestrato su 256? però in inference questo non viene minimamente usato, solo nei logger
    channels: 3
    concat_mode: true # there will be no context_dim specified in unet,
    # check configs/stable-diffusion/v1-inference.yaml for cross-attention adn context dim
    monitor: val/loss
    #monitor: val/loss_simple_ema
    # scale_factor: 0.18215
    ckpt_path: "models/ldm/inpainting_big/model_compvis.ckpt"

    scheduler_config: # 10000 warmup steps
      target: ldm.lr_scheduler.LambdaLinearScheduler
      params:
        warm_up_steps: [ 10000 ] # NOTE for resuming 2500. use 10000 if starting from scratch
        cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
        f_start: [ 1.e-6 ]
        f_max: [ 1. ]
        f_min: [ 1. ]
    unet_config:
      target: ldm.modules.diffusionmodules.openaimodel.UNetModel
      params:
        image_size: 64 # unused
        in_channels: 7 # image, masked image, mask
        out_channels: 3 #FINAL IMAGE
        model_channels: 256
        attention_resolutions:
        - 8
        - 4
        - 2
        num_res_blocks: 2
        channel_mult:
        - 1
        - 2
        - 3
        - 4
        num_heads: 8
        resblock_updown: true
        use_checkpoint: True # gradient checkpointing
        # legacy: False

    first_stage_config:
      target: ldm.models.autoencoder.VQModelInterface
      params:
        embed_dim: 3
        n_embed: 8192
        monitor: val/rec_loss
        ddconfig:
          attn_type: none # concat mode
          double_z: false
          z_channels: 3
          resolution: 256
          in_channels: 3
          out_ch: 3
          ch: 128
          ch_mult:
          - 1
          - 2
          - 4
          num_res_blocks: 2
          attn_resolutions: []
          dropout: 0.0
        lossconfig:
          target: torch.nn.Identity # NO TRAIN FOR AUTOENCODER
    cond_stage_config: __is_first_stage__

data:
  target: main_inpainting.DataModuleFromConfig
  params:
    batch_size: 2
    num_workers: 1
    wrap: false
    train:
      target: ldm.data.inpainting.InpaintingTrain
      params:
        csv_file: "desktop_data.csv"
        data_root: "data/INPAINTING/custom_inpainting"
        size: 512
    validation:
      target: ldm.data.inpainting.InpaintingValidation
      params:
        csv_file: "desktop_data.csv"
        data_root: "data/INPAINTING/custom_inpainting"
        size: 512

lightning:
  find_unused_parameters: False

  callbacks:
    image_logger:
      target: main_inpainting.ImageLogger
      params:
        disabled: False
        batch_frequency: 750
        max_images: 4
        increase_log_steps: True
        log_first_step: True
        log_images_kwargs:
          use_ema_scope: False
          plot_progressive_rows: True
          plot_diffusion_rows: True
          N: 4
          unconditional_guidance_scale: 1.0
          unconditional_guidance_label: [""]
          ddim_steps: 50  # todo check these out for inpainting,
          ddim_eta: 0.0   # todo check these out for inpainting,
  # trainer:
  #   benchmark: True
  #   val_check_interval: 5000000  # really sorry
  #   num_sanity_val_steps: 0
  #   accumulate_grad_batches: 2

If I understood well, you didn't reshape and transpose the input images in the way accepted by the SD training framework. It should be (batch size, height, width, channels). I recently committed a code refactor, to ease all the learning and usage process! So pull the repo before going further into the details!

authors: DMAgit lorenzo-stacchio


text:
In ios only  show lottie if i change the lottie json and save

Description
The animation dont play until change the animation fila and save

Pice of the code
import React from 'react';
import { Lottie, ContainerLottie } from './Animation.styles';
import Error from '~/assets/animations/error.json';
import Intro from '~/assets/animations/intro.json';
import Loading from '~/assets/animations/loading.json';
import Scheduled from '~/assets/animations/scheduled.json';
import Success from '~/assets/animations/success.json';
const- -Animation: React.FC-<-AnimationProps> = (props) => (
-<C. ontainerLottie.   >
{props.type === 'error' && }
{props.type === 'intro' && }
{props.type === 'loading' && (
-
)}
{props.type === 'scheduled' && (

)}
{props.type === 'success' && (
<L. ott. ie source={Success} autoPlay loop={false} />
)}
-<.    /ContainerLottie>
);

RN 0.66.1
Lottie 5.0.1

hello,
did you figure it out? same issue here

hello,
did you figure it out? same issue here

i made a downgrade for the version 4.1.3

I tried the same but it didnt work also expo gave me a message that it is not compatible

Hi,
The code you are sharing does not have enough information and it really depends on the animations you are using.
Attach the json file you are trying to load or if you are not facing the issue anymore let us know.
This is not a valid issue and the description does not provide anything.

This is still an issue,
The animation doesn't work until I manually change the source prop value and save.
here's my Lottie file: https://github.com/Abdoulrasheed/dscmautech/blob/master/successII.json

Still facing this exact same issue

authors: Abdoulrasheed Davi9130 elie-chaaban jacksonHendric matinzd

repo: lottie-react-native/lottie-react-native


text:
Some suggestions for DingTalk push methods

📑 I have found these related issues/pull requests
I didn't find any related questions
🏷 Feature Request Type
Change to existing notification-provider
🔖 Feature description
It is recommended that in the dingding notification, you can add parameters such as whether to @ everyone and the user ID of the @ person and the mobile phone number of the @ person according to the official development documentation of DingTalk. It is supported to configure these parameters when configuring the notification message. Three parameters make reminders richer~
✔ Solution
I want to support the @designated person’s mobile phone number, the userId of the @designated person, and whether to @everyone when notifying DingTalk messages.
❓ Alternatives
Try to use webhook to customize notification messages, but this is more troublesome.
📝 Additional Context
Currently, the message type used in the dingding notification type is markdown type. The following parameters need to be added:
{      "msgtype": "markdown",      "markdown": {          "title":"杭州天气",          "text": "#### 杭州天气 @150XXXXXXXX \n > 9度，西北风1级，空气良89，相对温度73%\n > ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)\n > ###### 10点20分发布 [天气](https://www.dingtalk.com) \n"      },       "at": {           "atMobiles": [               "150XXXXXXXX"           ],           "atUserIds": [               "user123"           ],           "isAtAll": false       }  }
in:
atMobiles is the mobile phone number of the person being @ (the mobile phone number of the @ person must be included in the text content. Only members in the group can be @, and the mobile phone numbers of non-members in the group will be desensitized.) The data type is Array;
atUserIds is the userId of the @ person (add the userId of the @ person in text.) The data type is Array;
isAtAll is whether @ everyone. The data type is Boolean.
For details, please refer to the markdown type in this article.
https://open.dingtalk.com/document/orgapp/custom-bot-send-message-type

The problem with adjusting notification providers is that there always is manual testing involved (how does this look?, does it work as documented?)
=> changes to notification providers are both simpler and more reliant on our community as testing them is very manual.
=> If you want a change like a "Notify"-selector and conditional input, we would be open to that. Our contribution guide is found here. The guideance on new notification providers is likely the most relevant.

authors: CommanderStorm niujinkai

repo: louislam/uptime-kuma


text:
Importing a backup is too slow

Is it a duplicate question?
I didn't find any matching issue.
Describe the bug
Currently, importing a medium size backup (a little above 100 monitors) takes ages to do. I waited a few minutes, but nothing new shown up in the dashboard. I ended up splitting the backup to ~30 smaller files, which loaded nearly instantly.
To Reproduce
Import a backup JSON with about 100 monitors.
Expected behavior
Simply, better import performance. A progress bar would be a nice addition.
If I recall correctly, monitors are stored in sqlite3 database, why not export backup as SQL statements?
There is any reason to pass all monitors one by one to monitor creation function?
Info
Uptime Kuma Version: 1.8.0
Using Docker?: Yes
Docker Version: 20.10.9
Node.js Version (Without Docker only):
OS: CentOS 8.4
Browser: Edge
Error Log
Noting was logged.
I know that's not a bug, it's a performance issue, but it's closer to bug than feature request.

This is a performance issue with your host, not uptime-kuma.
I have almost 300 monitors and the backup import takes 5-10secs. Running on 2cpu/2gb of ram in Docker + NGINX

I'm running uptime-kuma on kvm with 2x2.2 GHz and 6 GB ram, Docker + Caddy.

I have moved uptime-kuma to a better host and importing works well.
I guess it was a performance issue, like @gaby said.

authors: NixNotCastey gaby


text:
Dark Mode

Loving this project !
Are there any plans to support Dark Mode in UI ?
I think having dark mode will be a killer feature.
Thanks !

Hi! The overall theme is provided by tabler, which does support dark mode, so it shouldn't be too hard to do.
The first thing you can do is customize your own shell component locally. Create a shell.handlebars file in sqlpage/templates.
Copy the official shell, and switch to tabler's dark mode by adding the tabler-dark theme on the body.
If it works well, you can open a pull request here to add an option in the shell template for dark mode.

My mistake, it looks like it's not class="theme-dark", but data-bs-theme="dark"

@accforgithubtest , do you want to make the small PR ?
It could be as simple as adding
{{#if dark}}
   data-bs-theme="dark"
{{/if}}

to shell.handlebars

done :confetti_ball: :heavy_check_mark:
This will be in the next version.

authors: accforgithubtest lovasoa

repo: lovasoa/SQLpage


text:
Format for manipulating pixels directly from JS?

I'm developing a library for processing GIF animations in Javascript. The library currently wraps Jimp but I'm wondering if I might write an adapter for sharp as well.
I've abstracted the GIF encoder and decoder, so that they provide image frames in a format that is consistent across the GIF library, independent of encoder/decoder. I'm currently using the Jimp data format, which is an array of numbers at four numbers per pixel -- RGBA.
Does sharp have a similar pixel format that allows my library to manipulate pixels directly? What is that format? How do I get it? I had trouble finding it looking through the code and docs.
For example, my decoder would pull a GIF into JS as a series of images. Right now I store those images in Jimp form, allowing Jimp to manipulate them and write them back out (as everything but GIF animations). I'd like to be able to load images in a form that sharp can work with as well. After manipulating the GIF image frames in JS (yeah, slow) or sharp, an encoder supporting multi-frame GIFs will write the animation back out.

Hello, sharp can deal with Buffers containing raw, uncompressed RGBA data as both input and output, e.g. (untested):
const { data, width, height } = jimpImage.bitmap;

sharp(data, { raw: { width, height, channels: 4 }})
  .resize(width / 2)
  .raw()
  .toBuffer((err, rgbaBuffer, info) => { ... });

Excellent! Thank you! I assume that I can also convert back after manipulating it in sharp?

Yes, hence the use of the raw output selector in that example.

Oh I gotcha! You took it to sharp and back. Perfect. Thank you!

authors: jtlapp lovell

repo: lovell/sharp


text:
Port of libo3d3xx OEM module

One of the last major features not available in ifm3d yet available in libo3d3xx is the zero-copy framegrabber for embedded/OEM builds. It would be good to port that software to ifm3d and allow us to begin deprecating libo3d3xx.

@tpanzarella ; @graugans  : One more remark for you guys, as described in your main Readme.md

Once 18.04 is released, we will drop support for 14.04 and only be supporting 18.04 and 16.04. If you are using this library embedded in a product, you should plan accordingly.

It looks like from 0.9.0 revision of ifm3d Ubuntu 14.04 is no more supported...
This information is missing from libo3d3xx. To my prospective it would be great to have alignement with this piece of info especillay if we want to focus everyone on ifm3d at the end. This is clearly a point for OEM module. (Typical questions from customer 😄 )
What do you think of ?

In my view, libo3d3xx is legacy software -- albeit, supported. I do not see moving it feature-forward as we are doing with ifm3d. To that end, I think libo3d3xx will continue to support 14.04 as it does today. I would urge all new developments to use ifm3d. Should ifm3d users want to continue with 14.04, a back port would need to be maintained by the stakeholders as we move the mainline forward to a more modernized stack.


text:
List of tests for each config

We have multiple Ibex configurations currently, listed at https://github.com/lowRISC/ibex/blob/master/ibex_configs.yaml, which enable a different set of functionality.
To run full DV regressions (in CI), I need a list of tests which are expected to pass for each configuration. For example, the small configuration doesn't have PMP and shouldn't run the PMP tests.
Currently, we run make -C dv/uvm/core_ibex ISS=spike IBEX_CONFIG=${{ config }} (with ${{ config }}) being replaced by one of the supported configurations). Can we somehow expand the tooling to also pick the right set of tests? I can see two options (there might be more):

Add the test list to ibex_configs.yml
Modify the tests to skip themselves when the right RTL parameter isn't set

The second options seems more flexible to me and it will also help users who don't run with a config, but just set the parameters directly.
Ideally, we can come up with a way to "discover" the required set of tests in some of the tooling we have in the repository, and don't hard-code this list into the CI configuration. This will allow human users to run (hopefully) a single command to get the right set of tests for their config.
@udinator @GregAC

I think I agree with the second option here, I don't think that adding the static test list to each config is the right way of doing this.
Potentially a simple implementation method would look like this:
- Add anew  list field to each YAML entry, containing the (if any) RTL parameters that it needs to run properly
- In sim.py, skip a test from being processed if any of its requisite parameters aren't present (probably a quick for loop)

One question I do have - this (or a similar approach) would probably require that the sim.py script have access to the list of parameter values from `ibex_configs.yaml.
@GregAC is this possible to do with the configs flow that you set up?

I think I agree with the second option here, I don't think that adding the static test list to each config is the right way of doing this.
Potentially a simple implementation method would look like this:
- Add anew  list field to each YAML entry, containing the (if any) RTL parameters that it needs to run properly
- In sim.py, skip a test from being processed if any of its requisite parameters aren't present (probably a quick for loop)

One question I do have - this (or a similar approach) would probably require that the sim.py script have access to the list of parameter values from `ibex_configs.yaml.
@GregAC is this possible to do with the configs flow that you set up?

sim.py could read ibex_configs.yaml directly easily enough. The other option would be to pass config details into sim.py using ibex_config.py. ibex_config.py is designed to read the config YAML and produce appropriate arguments for different tools so we'd add a new option for it to generate appropriate sim.py arguments.
I'd tend towards the first option, ibex_config.py could be imported into sim.py so we don't have two different implementations of config file reading (there's very little to it but there's a default file specified and an environment variable override, plus if we do make things more complex in the future we don't want to separately implement new features in two different places).

sim.py could read ibex_configs.yaml directly easily enough. The other option would be to pass config details into sim.py using ibex_config.py. ibex_config.py is designed to read the config YAML and produce appropriate arguments for different tools so we'd add a new option for it to generate appropriate sim.py arguments.
I'd tend towards the first option, ibex_config.py could be imported into sim.py so we don't have two different implementations of config file reading (there's very little to it but there's a default file specified and an environment variable override, plus if we do make things more complex in the future we don't want to separately implement new features in two different places).

Sorry for my delay here, have been tied up with other OT work.
@GregAC I agree with the first option as well, I'll draft a sample implementation soon and get a PR ready.

Great, thanks a lot @udinator!

This functionality has been added

authors: GregAC imphil udinator

repo: lowRISC/ibex

license_source: bigquery


text:
Question about secure boot public key initialization

hi all,
I have a question about the initial Creator public keys used for secure boot.
The codebase shows that the keys are hardcoded in the ROM code. The OTP only controls their validity.
I am wondering why OpenTitan does not use OTP to keep public keys in the hash digest way?
Silicon creators would have more flexibility to decide the secure boot keys with OTP provisoning at the manufacturing phase.
If the public keys are hardcoded in the ROM code, the keys must be determined at design phase.
Could you help me to clarify on this? Any guidance is appreciated.
Thanks,
Chiawei

others can chime in more, but from my perspective.. allowing otp digest of keys means at some point in the flow, the keys used for verification can be arbitrarily controlled. By baking it into ROM, we are enforcing that each revision / version of opentitan is strongly bound to the creator.  The early stages of code, as you see in our documentation, were also not meant to be controlled by owners later, since it has ownership transfer responsibilities.
On another related point, the digest comparison has also been vulnerable to attacks in other chipsets.  I believe there was one such attack on tegra some years ago.

What @tjaychen summarizes our thinking behind storing the keys in the ROM. We want a strong link to the creator to ensure ROM_EXT signatures are verifiable against operational and infrastructure production requirements.
We also want to avoid having to rely on the security of the manufacturing process to provisioning the verification keys, and don't plan to use identity key injection in our reference provisioning flows. Ideally, we want to get to a place where the device under test can authenticate itself directly with the provisioning infrastructure to avoid having to store secrets in ATE. In order to get there, we need the ability to establish trust in the device life cycle state and code running on the DUT, thus leaving OTP verification keys outside the scope of this implementation.

Thanks for your kind explanation!
The reason I have this question is due to the consideration on commercial chain.
If one chip vendor joins different creator groups, the chip may not be commonly used unless all of the secure boot public keys are forseen and embedded in ROM. (not a good idea)

if you follow along our security documentation, i think our recommendation is to diversify a lot of the related use cases to the next stage of code.  This means the first stage of software after ROM (ROM_EXT in our terminology) is really tightly coupled with the ROM and bears the responsibility of adapting to later use cases.
By doing this, it allows us to keep the branches inside ROM small and the logic very linear, and defer a lot of the more complex decisions to later. This also reduces the need to have everything figured out inside the ROM early on. Of course, this may not be something that is applicable to every scenario out there.
Lastly, OpenTitan is an open source project after all, so if you have different ideas, we really encourage you to make a proposal and share it with the community.

Agree to keep ROM small and simple.
Balancing security and flexibility is always the dilemma.
Great thanks for your kind response, giving me more clear picture about the security design.
Issue closed.

authors: ChiaweiW moidx tjaychen

repo: lowRISC/opentitan


text:
[chip-test] Add connectivity tests for AST signals

Test point name
TBD. Note that this is an FPV connectivity test.
Host side component
No response
OpenTitanTool infrastructure implemented
No response
Contact person
@tjaychen @msfschaffner
Checklist
Please fill out this checklist as items are completed. Link to PRs and issues as appropriate.

[x] Check if existing test covers most or all of this testpoint (if so, either extend said test to cover all points, or skip the next 3 checkboxes)
[x] Device-side (C) component developed
[x] Bazel build rules developed
[x] Host-side component developed
[x] HJSON test plan updated with test name (so it shows up in the dashboard)
[x] Test added to dvsim nightly regression (and passing at time of checking)

This is working in the nightlies now.


text:
Re-generating RndCnst for each build

Similarly to the OTP images, we recently enabled re-generation of random netlist constants for the life cycle state and top-level RndCnst parameters.
For the latter, we ran into CI issues, since in-tree modifications made in the build phase do not persist into the run phase on all platforms, since the two phases can be scheduled as separate jobs. As explained in #16699, software tests relying on scrambled ROM images fail because the ROM scrambling step executed in the run phase through bazel is using the wrong RndCnst for the scrambling key.
In the short term, rerunning top-gen in the run phase with the correct build_seed would be a workaround to enable this flow. Long term, we should add a mechanism to pass the build_seed into the ROM generation step in bazel, similarly to how OTP images are generated.

@sriyerg @timothytrippel @tjaychen @weicaiyang @cindychip

@vogelpi should this be part of the RndCnst efforts? Moving to M2.5. Please move to Backlog if it makes sense. Thanks.

It's fairly important to have a way to test this re-generation over a number of iterations, in case there is some issue, so I wouldn't suggest backlog here.

After discussion with @msfschaffner

[x] the build seed is now available in the dvsim run stage via the envar build_seed; so that part is solved
[ ] passing the ROM scrambling key material into the ROM generation step in bazel still needs to be done; I will work on that and we can then turn on RndCnst regeneration in the nightlies

I don't know what everyone would consider an appropriate number of nightlies to exercise this seeding/regeneration process to be, but something like a ~month's worth feels correct to me.

Moving this to M2.5.2 as we discussed.

Moving into the next milestone since we did not have time for doing this.
We do however run regressions on the closed source side with regenerated constants - so this is covered to some extend (although not in the public facing nightlies).

@moidx has impact on manufacturing testing to align scrambling config.

@moidx and I discussed that enabling this in CI is most likely going to trash the buildsystem caching. Thus, it would be better to setup a weekly test run for this or so.

Could we do it more simply, by checking in a "base" build constant and then adding the week number to it on the fly? That would avoid having to do a "weekly bump".

By @moidx: Problem is understood. Only applicable to DV flow. Integrating it will be painful. Given the timeline we'll probably not be able to address this before closed source. Recommendation is to put into backlog and address any closed source issues if and when they come up. @timothytrippel and I can help with this.
By @vogelpi: Agreed.

authors: andreaskurth cdgori moidx msfschaffner rswarbrick timothytrippel vogelpi


text:
[otbn] Latch inferrred due to missing default

While going through the warnings in Vivado, I noted that the signal insn_subset inside hw/ip/otbn/rtl/otbn_decoder.sv does not have a default. There is no assignment in the top of the always_comb block and the default case does not define it either. This causes a latch to be inferred during synthesis.
I think this can be fixed easily, but I am not sure what the expected behavior of this signal is. I think this is relevant for @GregAC and @imphil .

Good catch, we'll just a default assignment at the top of the always_comb block, its value doesn't matter unless there's a valid instruction to process.
I'll put a commit to fix as part of my next PR (implementing LID/SID) as I don't think a fix is urgent.

Yes, I agree that this is not urgent. Thanks for taking care of it Greg.

@msfschaffner (or anyone else who has access to the synthesis logs) - can you confirm in the Design Compiler logs that you see a warning about latch inference for insn_subset as well? (i.e. would we also have caught this there?)

Indeed, the DC synthesis regression reports:
Warning:  ../src/lowrisc_ip_otbn_0.1/rtl/otbn_decoder.sv:183: Netlist for always_comb block contains a latch.

This was fixed in https://github.com/lowRISC/opentitan/pull/3710

authors: GregAC cdgori msfschaffner vogelpi


text:
[spi_device] Scoreboard for passthrough mode

Added initial scoreboard extension for passthrough mode. Checks enabling of commands, filtering of commands and address translation. For now works for 3B addresses (the ones used in current tests).
Signed-off-by: Kosta Kojdic kosta.kojdic@ensilica.com

Do you have access to the OpenTitan private CI logs? If not, ask and I'll add you to the relevant group. CI is failing because the spi_device block-level tests don't compile. (Looks like a syntax error: try building locally and you'll presumably see the same thing)

Do you have access to the OpenTitan private CI logs? If not, ask and I'll add you to the relevant group. CI is failing because the spi_device block-level tests don't compile. (Looks like a syntax error: try building locally and you'll presumably see the same thing)

OK, thanks, I will check. Please add me to the relevant group.

Do you have access to the OpenTitan private CI logs? If not, ask and I'll add you to the relevant group. CI is failing because the spi_device block-level tests don't compile. (Looks like a syntax error: try building locally and you'll presumably see the same thing)

OK, thanks, I will check. Please add me to the relevant group.

@rswarbrick did you add me to the group with access rights. I still can't open Azure logs. As for the error it is fixed, it was VCS compile issue, latest couple of commits I teste only on Xcelium.

source: gharchive/pull-request

authors: kosta-kojdic rswarbrick


text:
[util, top] Add ANALOGSIM macros for chip_earlgrey_asic

Adding ANALOGSIM macros in top_earlgrey_pkg.sv and using them at chip_earlgrey_asic.sv.
See issue: [top] ANALOGSIM macro-base solution #15050
@arnonsha @sha-ron @ariel9678
Signed-off-by: Jacob Levy jacob.levy@nuvoton.com

@tjaychen @msfschaffner  Please review, approve & merge.

@tjaychen @msfschaffner Made the python search/replace more robust.

@tjaychen @msfschaffner Rerun failed on timeout of ROM tests (no changes). can you guys rerun just the checks...

@tjaychen @msfschaffner
Rebased & pushed to rerun the checks...

@tjaychen @msfschaffner
Rebase and update the MACROs to tei all the padring ports (4) to '0 (no unconnect) in ANALOGSIM mode.
ADC tests (NTIL) with ANALOGSIM were run and passed.

@tjaychen @msfschaffner
Kept the Michael's original automated file for reference.
PLEASE NOTE: These changes are only for DV tests support much like all 'plusargs' that was added to the AST.

@tjaychen @msfschaffner
In order to be able to use the the Label, Ready-to-Merge, I need to be a member of [lowRISC/opentitan-committers] which I am not :(
[Jacob-Levy](https://github.com/Jacob-Levy)
[Jacob](https://github.com/Jacob-Levy)
Opened this pull request
Committed to this repository in the past week
Member of [lowRISC/opentitan](https://github.com/orgs/lowRISC/teams/opentitan)
Member of [lowRISC](https://github.com/lowRISC)

Thanks for this proposal PR @Jacob-Levy - I am closing this now, since this macro-based solution has been integrated into the topgen template in #17011.

authors: Jacob-Levy msfschaffner


text:
[fpv] fpv improvement

Add bind file back to some IPs
Change fpv target to fpv instead of default
Signed-off-by: Cindy Chen chencindy@google.com

This PR solves one of the issues reported in the issue #1361

Very nice indeed, thanks for cleaning this up.

Thank you, and also thanks to Philipp's idea!
On Tue, Mar 31, 2020 at 3:15 PM Michael Schaffner notifications@github.com
wrote:

Very nice indeed, thanks for cleaning this up.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/lowRISC/opentitan/pull/1797#issuecomment-606905772,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACXPOOIXFOIEUYNTFCJIY5TRKJTRDANCNFSM4LQPS6YQ
.

authors: cindychip msfschaffner


text:
[i2c,dv] I2C agent sequences rework for transfer-level items

The first two commits in this PR are squashes of other PRs, on which we are dependent. They should both be ignored for reviewing purposes, and will be rebased away when they land.
Without these two commits : 313 insertions(+), 126 deletions(-)

Fixup the i2c_agent's target-mode sequences to use the new transfer-level TLM items from the i2c_monitor (functionality added in #23955). This removes the strange partial-item messages that were passed from monitor to seqr via the 'req_analysis_port', which was inflexible and used the existing i2c_item for yet another alternate purpose. With this change, the sequences can pickup the 'in-progress' transfer item from the monitor, and observe the state of the transaction as it progresses via the i2c_item.state field.
The base_seq has been amended to add this monitor-tracking behaviour, and now provides a number of callback routines that derived sequences can use to drive the bus at the correct time.
The derived target-mode sequences have been cleaned up and reworked to use these new callbacks.
A significant fraction of the LoC changes are comments, to help me and the next person remember what is going on here.

Rebased

Latest pushes address review feedback.

CI has some failures, mostly to do with bazel failing to fetch some dependencies, and some flaky CW310 ROM tests. I don't think any of that is related to this PR at all, and no I2C tests are failing. Hence merging now...


text:
[doc] Document the requirement for OpenOCD 0.11

After a rather extensive release cycle the OpenOCD finally produced an
upstream stable release with RISC-V support. This allows us to switch
back to the normal upstream version of OpenOCD, which will soon also
appear in distribution.
CI is already using OpenOCD 0.11.0 (rc2 before, since today the final
0.11.0 release), giving us the confidence that what we document actually
works.

Btw, you can get the OpenOCD packages we use in CI at https://software.opensuse.org/download/package?package=openocd-0.11.0&project=home%3Aphiwag%3Aedatools if you don't want to compile it yourself.

Woo!


text:
[keymgr] Distinguish disabled / invalid for fault purposes

Fixes #8116

Signed-off-by: Timothy Chen timothytim@google.com

@weicaiyang can you let me know if this addresses your issue? Sorry I'm not thinking super clearly right now, so this might not work.

does it..break anything else?
On Wed, Sep 8, 2021 at 5:48 PM weicaiyang @.***> wrote:

@.**** approved this pull request.
This works. Thanks for the quick fix
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/lowRISC/opentitan/pull/8118#pullrequestreview-749732856,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAH2RSQP4GH7PDFGIKFC5H3UA7737ANCNFSM5DV3H4VQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

does it..break anything else?

No, nothing is broken by this. Thanks

authors: tjaychen weicaiyang


text:
Raspberry Pi Zero, Node 8.9 not working (node-gyp rebuild)

Hi,
i tried to install airtunes via npm install airtunes but i only get the following results:
pi@vinylpi:~/airtunes $ npm install airtunes

> airtunes@0.1.7 install /home/pi/airtunes/node_modules/airtunes
> node-gyp rebuild

make: Entering directory '/home/pi/airtunes/node_modules/airtunes/build'
  CXX(target) Release/obj.target/airtunes/src/codec.o
In file included from ../src/../alac/ALACEncoder.h:29:0,
                 from ../src/codec.cc:15:
../src/../alac/ALACAudioTypes.h:64:32: warning: multi-character character constant [-Wmultichar]
     kALACFormatAppleLossless = 'alac',
                                ^~~~~~
../src/../alac/ALACAudioTypes.h:65:28: warning: multi-character character constant [-Wmultichar]
     kALACFormatLinearPCM = 'lpcm'
                            ^~~~~~
../src/../alac/ALACAudioTypes.h:154:22: warning: multi-character character constant [-Wmultichar]
  kALACCodecFormat  = 'alac',
                      ^~~~~~
../src/../alac/ALACAudioTypes.h:182:26: warning: multi-character character constant [-Wmultichar]
  AudioChannelLayoutAID = 'chan'
                          ^~~~~~
../src/codec.cc: In function 'void nodeairtunes::encoder_weak_callback(v8::Persistent<v8::Value>, void*)':
../src/codec.cc:59:15: error: 'v8::HandleScope::HandleScope()' is protected within this context
   HandleScope scope;
               ^~~~~
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:874:13: note: declared protected here
   V8_INLINE HandleScope() {}
             ^~~~~~~~~~~
../src/codec.cc:62:11: error: 'class v8::Persistent<v8::Value>' has no member named 'Dispose'
   wrapper.Dispose();
           ^~~~~~~
../src/codec.cc: At global scope:
../src/codec.cc:67:32: error: 'Arguments' does not name a type
 Handle<Value> NewEncoder(const Arguments& args) {
                                ^~~~~~~~~
../src/codec.cc: In function 'v8::Handle<v8::Value> nodeairtunes::NewEncoder(const int&)':
../src/codec.cc:68:15: error: 'v8::HandleScope::HandleScope()' is protected within this context
   HandleScope scope;
               ^~~~~
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:874:13: note: declared protected here
   V8_INLINE HandleScope() {}
             ^~~~~~~~~~~
../src/codec.cc:78:97: warning: 'static v8::Local<v8::ObjectTemplate> v8::ObjectTemplate::New()' is deprecated: Use isolate version [-Wdeprecated-declarations]
   Persistent<ObjectTemplate> encoderClass = Persistent<ObjectTemplate>::New(ObjectTemplate::New());
                                                                                ^
In file included from /home/pi/.node-gyp/8.9.4/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/8.9.4/include/node/node.h:63,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:5656:69: note: declared here
   static V8_DEPRECATED("Use isolate version", Local<ObjectTemplate> New());
                                                                     ^
/home/pi/.node-gyp/8.9.4/include/node/v8config.h:318:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/codec.cc:78:98: error: no matching function for call to 'v8::Persistent<v8::ObjectTemplate>::New(v8::Local<v8::ObjectTemplate>)'
   Persistent<ObjectTemplate> encoderClass = Persistent<ObjectTemplate>::New(ObjectTemplate::New());
                                                                                ^
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:9114:4: note: candidate: static T* v8::PersistentBase<T>::New(v8::Isolate*, T*) [with T = v8::ObjectTemplate]
 T* PersistentBase<T>::New(Isolate* isolate, T* that) {
    ^~~~~~~~~~~~~~~~~
/home/pi/.node-gyp/8.9.4/include/node/v8.h:9114:4: note:   candidate expects 2 arguments, 1 provided
../src/codec.cc:79:15: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::ObjectTemplate>'
   encoderClass->SetInternalFieldCount(1);
               ^~
../src/codec.cc:80:62: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::ObjectTemplate>'
   Persistent<Object> o = Persistent<Object>::New(encoderClass->NewInstance());
                                                              ^~
../src/codec.cc:81:4: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Object>'
   o->SetPointerInInternalField(0, encoder);
    ^~
../src/codec.cc:82:5: error: 'class v8::Persistent<v8::Object>' has no member named 'MakeWeak'; did you mean 'SetWeak'?
   o.MakeWeak(encoder, encoder_weak_callback);
     ^~~~~~~~
../src/codec.cc:84:16: error: 'class v8::HandleScope' has no member named 'Close'
   return scope.Close(o);
                ^~~~~
../src/codec.cc: At global scope:
../src/codec.cc:87:32: error: 'Arguments' does not name a type
 Handle<Value> EncodeALAC(const Arguments& args) {
                                ^~~~~~~~~
../src/codec.cc: In function 'v8::Handle<v8::Value> nodeairtunes::EncodeALAC(const int&)':
../src/codec.cc:88:15: error: 'v8::HandleScope::HandleScope()' is protected within this context
   HandleScope scope;
               ^~~~~
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:874:13: note: declared protected here
   V8_INLINE HandleScope() {}
             ^~~~~~~~~~~
../src/codec.cc:90:11: error: request for member 'Length' in 'args', which is of non-class type 'const int'
   if(args.Length() < 4) {
           ^~~~~~
../src/codec.cc:92:18: error: 'class v8::HandleScope' has no member named 'Close'
     return scope.Close(Null());
                  ^~~~~
../src/codec.cc:92:29: error: too few arguments to function 'v8::Local<v8::Primitive> v8::Null(v8::Isolate*)'
     return scope.Close(Null());
                             ^
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:313:27: note: declared here
   friend Local<Primitive> Null(Isolate* isolate);
                           ^~~~
../src/codec.cc:95:32: error: invalid types 'const int[int]' for array subscript
   Local<Object>wrapper = args[0]->ToObject();
                                ^
../src/codec.cc:96:49: error: 'class v8::Object' has no member named 'GetPointerFromInternalField'; did you mean 'GetAlignedPointerFromInternalField'?
   ALACEncoder *encoder = (ALACEncoder*)wrapper->GetPointerFromInternalField(0);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/codec.cc:98:34: error: invalid types 'const int[int]' for array subscript
   Local<Value> pcmBuffer = args[1];
                                  ^
../src/codec.cc:101:35: error: invalid types 'const int[int]' for array subscript
   Local<Value> alacBuffer = args[2];
                                   ^
../src/codec.cc:104:27: error: invalid types 'const int[int]' for array subscript
   int32_t pcmSize = args[3]->Int32Value();
                           ^
../src/codec.cc:113:16: error: 'class v8::HandleScope' has no member named 'Close'
   return scope.Close(Integer::New(alacSize));
                ^~~~~
../src/codec.cc:113:43: error: no matching function for call to 'v8::Integer::New(int32_t&)'
   return scope.Close(Integer::New(alacSize));
                                           ^
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:2914:25: note: candidate: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
   static Local<Integer> New(Isolate* isolate, int32_t value);
                         ^~~
/home/pi/.node-gyp/8.9.4/include/node/v8.h:2914:25: note:   candidate expects 2 arguments, 1 provided
../src/codec.cc: At global scope:
../src/codec.cc:116:32: error: 'Arguments' does not name a type
 Handle<Value> EncryptAES(const Arguments& args) {
                                ^~~~~~~~~
../src/codec.cc: In function 'v8::Handle<v8::Value> nodeairtunes::EncryptAES(const int&)':
../src/codec.cc:117:15: error: 'v8::HandleScope::HandleScope()' is protected within this context
   HandleScope scope;
               ^~~~~
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:874:13: note: declared protected here
   V8_INLINE HandleScope() {}
             ^~~~~~~~~~~
../src/codec.cc:119:11: error: request for member 'Length' in 'args', which is of non-class type 'const int'
   if(args.Length() < 2) {
           ^~~~~~
../src/codec.cc:121:18: error: 'class v8::HandleScope' has no member named 'Close'
     return scope.Close(Null());
                  ^~~~~
../src/codec.cc:121:29: error: too few arguments to function 'v8::Local<v8::Primitive> v8::Null(v8::Isolate*)'
     return scope.Close(Null());
                             ^
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:313:27: note: declared here
   friend Local<Primitive> Null(Isolate* isolate);
                           ^~~~
../src/codec.cc:124:35: error: invalid types 'const int[int]' for array subscript
   Local<Value> alacBuffer = args[0];
                                   ^
../src/codec.cc:126:28: error: invalid types 'const int[int]' for array subscript
   int32_t alacSize = args[1]->Int32Value();
                            ^
../src/codec.cc:149:16: error: 'class v8::HandleScope' has no member named 'Close'
   return scope.Close(Null());
                ^~~~~
../src/codec.cc:149:27: error: too few arguments to function 'v8::Local<v8::Primitive> v8::Null(v8::Isolate*)'
   return scope.Close(Null());
                           ^
In file included from /home/pi/.node-gyp/8.9.4/include/node/node.h:63:0,
                 from ../src/codec.cc:1:
/home/pi/.node-gyp/8.9.4/include/node/v8.h:313:27: note: declared here
   friend Local<Primitive> Null(Isolate* isolate);
                           ^~~~
../src/codec.cc: In function 'void nodeairtunes::InitCodec(v8::Handle<v8::Object>)':
../src/codec.cc:153:51: error: invalid conversion from 'v8::Handle<v8::Value> (*)(const int&) {aka v8::Local<v8::Value> (*)(const int&)}' to 'v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}' [-fpermissive]
   NODE_SET_METHOD(target, "encodeALAC", EncodeALAC);
                                                   ^
In file included from ../src/codec.cc:1:0:
/home/pi/.node-gyp/8.9.4/include/node/node.h:287:13: note:   initializing argument 3 of 'void node::NODE_SET_METHOD(v8::Local<v8::Object>, const char*, v8::FunctionCallback)'
 inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
             ^~~~~~~~~~~~~~~
../src/codec.cc:154:51: error: invalid conversion from 'v8::Handle<v8::Value> (*)(const int&) {aka v8::Local<v8::Value> (*)(const int&)}' to 'v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}' [-fpermissive]
   NODE_SET_METHOD(target, "encryptAES", EncryptAES);
                                                   ^
In file included from ../src/codec.cc:1:0:
/home/pi/.node-gyp/8.9.4/include/node/node.h:287:13: note:   initializing argument 3 of 'void node::NODE_SET_METHOD(v8::Local<v8::Object>, const char*, v8::FunctionCallback)'
 inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
             ^~~~~~~~~~~~~~~
../src/codec.cc:155:51: error: invalid conversion from 'v8::Handle<v8::Value> (*)(const int&) {aka v8::Local<v8::Value> (*)(const int&)}' to 'v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}' [-fpermissive]
   NODE_SET_METHOD(target, "newEncoder", NewEncoder);
                                                   ^
In file included from ../src/codec.cc:1:0:
/home/pi/.node-gyp/8.9.4/include/node/node.h:287:13: note:   initializing argument 3 of 'void node::NODE_SET_METHOD(v8::Local<v8::Object>, const char*, v8::FunctionCallback)'
 inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
             ^~~~~~~~~~~~~~~
airtunes.target.mk:101: recipe for target 'Release/obj.target/airtunes/src/codec.o' failed
make: *** [Release/obj.target/airtunes/src/codec.o] Error 1
make: Leaving directory '/home/pi/airtunes/node_modules/airtunes/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.78+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/airtunes/node_modules/airtunes
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/airtunes/package.json'
npm WARN airtunes No description
npm WARN airtunes No repository field.
npm WARN airtunes No README data
npm WARN airtunes No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! airtunes@0.1.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the airtunes@0.1.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2018-01-30T20_06_33_920Z-debug.log

I looked into the other issues but i found no solution to this problem!
Yours,
Felix

Tried to install this on Ubuntu 16.04 and get a similar response:
> airtunes@0.1.7 install /usr/local/lib/node_modules/airtunes
> node-gyp rebuild

make: Entering directory '/usr/local/lib/node_modules/airtunes/build'
  CXX(target) Release/obj.target/airtunes/src/codec.o
In file included from ../src/../alac/ALACEncoder.h:29:0,
                 from ../src/codec.cc:15:
../src/../alac/ALACAudioTypes.h:64:32: warning: multi-character character constant [-Wmultichar]
     kALACFormatAppleLossless = 'alac',
                                ^
../src/../alac/ALACAudioTypes.h:65:28: warning: multi-character character constant [-Wmultichar]
     kALACFormatLinearPCM = 'lpcm'
                            ^
../src/../alac/ALACAudioTypes.h:154:22: warning: multi-character character constant [-Wmultichar]
  kALACCodecFormat  = 'alac',
                      ^
../src/../alac/ALACAudioTypes.h:182:26: warning: multi-character character constant [-Wmultichar]
  AudioChannelLayoutAID = 'chan'
                          ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h: In function ‘void nodeairtunes::encoder_weak_callback(v8::Persistent<v8::Value>, void*)’:
/usr/include/nodejs/deps/v8/include/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/codec.cc:59:15: error: within this context
   HandleScope scope;
               ^
../src/codec.cc:62:11: error: ‘class v8::Persistent<v8::Value>’ has no member named ‘Dispose’
   wrapper.Dispose();
           ^
../src/codec.cc: At global scope:
../src/codec.cc:67:32: error: ‘Arguments’ does not name a type
 Handle<Value> NewEncoder(const Arguments& args) {
                                ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> nodeairtunes::NewEncoder(const int&)’:
/usr/include/nodejs/deps/v8/include/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/codec.cc:68:15: error: within this context
   HandleScope scope;
               ^
../src/codec.cc:78:98: error: no matching function for call to ‘v8::Persistent<v8::ObjectTemplate>::New(v8::Local<v8::ObjectTemplate>)’
   Persistent<ObjectTemplate> encoderClass = Persistent<ObjectTemplate>::New(ObjectTemplate::New());
                                                                                ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:7181:4: note: candidate: static T* v8::PersistentBase<T>::New(v8::Isolate*, T*) [with T = v8::ObjectTemplate]
 T* PersistentBase<T>::New(Isolate* isolate, T* that) {
    ^
/usr/include/nodejs/deps/v8/include/v8.h:7181:4: note:   candidate expects 2 arguments, 1 provided
../src/codec.cc:79:15: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::ObjectTemplate>’
   encoderClass->SetInternalFieldCount(1);
               ^
../src/codec.cc:80:62: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::ObjectTemplate>’
   Persistent<Object> o = Persistent<Object>::New(encoderClass->NewInstance());
                                                              ^
../src/codec.cc:81:4: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::Object>’
   o->SetPointerInInternalField(0, encoder);
    ^
../src/codec.cc:82:5: error: ‘class v8::Persistent<v8::Object>’ has no member named ‘MakeWeak’
   o.MakeWeak(encoder, encoder_weak_callback);
     ^
../src/codec.cc:84:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
   return scope.Close(o);
                ^
../src/codec.cc: At global scope:
../src/codec.cc:87:32: error: ‘Arguments’ does not name a type
 Handle<Value> EncodeALAC(const Arguments& args) {
                                ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> nodeairtunes::EncodeALAC(const int&)’:
/usr/include/nodejs/deps/v8/include/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/codec.cc:88:15: error: within this context
   HandleScope scope;
               ^
../src/codec.cc:90:11: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
   if(args.Length() < 4) {
           ^
../src/codec.cc:92:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
     return scope.Close(Null());
                  ^
../src/codec.cc:92:29: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
     return scope.Close(Null());
                             ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:316:27: note: declared here
   friend Local<Primitive> Null(Isolate* isolate);
                           ^
../src/codec.cc:95:32: error: invalid types ‘const int[int]’ for array subscript
   Local<Object>wrapper = args[0]->ToObject();
                                ^
../src/codec.cc:96:49: error: ‘class v8::Object’ has no member named ‘GetPointerFromInternalField’
   ALACEncoder *encoder = (ALACEncoder*)wrapper->GetPointerFromInternalField(0);
                                                 ^
../src/codec.cc:98:34: error: invalid types ‘const int[int]’ for array subscript
   Local<Value> pcmBuffer = args[1];
                                  ^
../src/codec.cc:101:35: error: invalid types ‘const int[int]’ for array subscript
   Local<Value> alacBuffer = args[2];
                                   ^
../src/codec.cc:104:27: error: invalid types ‘const int[int]’ for array subscript
   int32_t pcmSize = args[3]->Int32Value();
                           ^
../src/codec.cc:113:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
   return scope.Close(Integer::New(alacSize));
                ^
../src/codec.cc:113:43: error: no matching function for call to ‘v8::Integer::New(int32_t&)’
   return scope.Close(Integer::New(alacSize));
                                           ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2499:25: note: candidate: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
   static Local<Integer> New(Isolate* isolate, int32_t value);
                         ^
/usr/include/nodejs/deps/v8/include/v8.h:2499:25: note:   candidate expects 2 arguments, 1 provided
../src/codec.cc: At global scope:
../src/codec.cc:116:32: error: ‘Arguments’ does not name a type
 Handle<Value> EncryptAES(const Arguments& args) {
                                ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> nodeairtunes::EncryptAES(const int&)’:
/usr/include/nodejs/deps/v8/include/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/codec.cc:117:15: error: within this context
   HandleScope scope;
               ^
../src/codec.cc:119:11: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
   if(args.Length() < 2) {
           ^
../src/codec.cc:121:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
     return scope.Close(Null());
                  ^
../src/codec.cc:121:29: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
     return scope.Close(Null());
                             ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:316:27: note: declared here
   friend Local<Primitive> Null(Isolate* isolate);
                           ^
../src/codec.cc:124:35: error: invalid types ‘const int[int]’ for array subscript
   Local<Value> alacBuffer = args[0];
                                   ^
../src/codec.cc:126:28: error: invalid types ‘const int[int]’ for array subscript
   int32_t alacSize = args[1]->Int32Value();
                            ^
../src/codec.cc:149:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
   return scope.Close(Null());
                ^
../src/codec.cc:149:27: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
   return scope.Close(Null());
                           ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/codec.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:316:27: note: declared here
   friend Local<Primitive> Null(Isolate* isolate);
                           ^
../src/codec.cc: In function ‘void nodeairtunes::InitCodec(v8::Handle<v8::Object>)’:
../src/codec.cc:153:51: error: no matching function for call to ‘NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [11], v8::Handle<v8::Value> (&)(const int&))’
   NODE_SET_METHOD(target, "encodeALAC", EncodeALAC);
                                                   ^
In file included from ../src/codec.cc:1:0:
/usr/include/nodejs/src/node.h:236:13: note: candidate: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
 inline void NODE_SET_METHOD(const TypeName& recv,
             ^
/usr/include/nodejs/src/node.h:236:13: note:   template argument deduction/substitution failed:
../src/codec.cc:153:51: note:   cannot convert ‘nodeairtunes::EncodeALAC’ (type ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’) to type ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’
   NODE_SET_METHOD(target, "encodeALAC", EncodeALAC);
                                                   ^
../src/codec.cc:154:51: error: no matching function for call to ‘NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [11], v8::Handle<v8::Value> (&)(const int&))’
   NODE_SET_METHOD(target, "encryptAES", EncryptAES);
                                                   ^
In file included from ../src/codec.cc:1:0:
/usr/include/nodejs/src/node.h:236:13: note: candidate: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
 inline void NODE_SET_METHOD(const TypeName& recv,
             ^
/usr/include/nodejs/src/node.h:236:13: note:   template argument deduction/substitution failed:
../src/codec.cc:154:51: note:   cannot convert ‘nodeairtunes::EncryptAES’ (type ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’) to type ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’
   NODE_SET_METHOD(target, "encryptAES", EncryptAES);
                                                   ^
../src/codec.cc:155:51: error: no matching function for call to ‘NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [11], v8::Handle<v8::Value> (&)(const int&))’
   NODE_SET_METHOD(target, "newEncoder", NewEncoder);
                                                   ^
In file included from ../src/codec.cc:1:0:
/usr/include/nodejs/src/node.h:236:13: note: candidate: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
 inline void NODE_SET_METHOD(const TypeName& recv,
             ^
/usr/include/nodejs/src/node.h:236:13: note:   template argument deduction/substitution failed:
../src/codec.cc:155:51: note:   cannot convert ‘nodeairtunes::NewEncoder’ (type ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’) to type ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’
   NODE_SET_METHOD(target, "newEncoder", NewEncoder);
                                                   ^
airtunes.target.mk:98: recipe for target 'Release/obj.target/airtunes/src/codec.o' failed
make: *** [Release/obj.target/airtunes/src/codec.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/airtunes/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-116-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/airtunes
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
/usr/local/lib
└── clone@2.1.1

npm ERR! Linux 4.4.0-116-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "i" "-g" "clone" "https://github.com/lperrin/node_airtunes.git"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! airtunes@0.1.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the airtunes@0.1.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the airtunes package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs airtunes
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls airtunes
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/kmgrider/npm-debug.log

authors: effem gearhead


text:
Upgrade for Mojo 24.1

Hi @lrmantovani10 These update the repo for Mojo 24.1.
I'm getting a segfault though on m2 macbook so might want to check this isn't breaking something that used to work.
Updates:

Change let to var
Change capacity to keyword-only argument
Fix vectorize and vectorize_unroll signatures
Fix slice now named Slice

Cool, thanks @lrmantovani10 I merged in your new changes for the small images, all working now.
Stable-Diffusion.mojo git:update-mojo-24.1 ❯ mojo demo.mojo
CLIP forward pass concluded
Encoder instance created
Encoder noise initialized
Diffusion instance created
Decoder forward pass concluded

Awesome! merging


text:
Increase Course Registration Message Max Length from 255 to 2000

Checklist

[ ] Wait for reviewing and testing on the test servers until the DB changes are approved.
[ ] I tested all changes and all related features with different users (student, tutor, instructor, admin) on the test server https://artemistest.ase.in.tum.de.

Motivation and Context
Registration messages can easily be longer than 255 characters and such a strong limitation does not make sense. Instructors might not be able to have a bilingual message or include important legal information. We should allow longer registration messages.
Description

Increase the maximum registration message length in the database, server and client.

Steps for Testing

Review the code
Create a course with long registration message (255 + chars)
Check that it is displayed correctly when a student registers.

Test Coverage
Unchanged.
Screenshots

The changes are approved! Please test it quickly on a test server, then we can merge it.

authors: MaisiKoleni krusche


text:
chore(master): release 1.5.3

:robot: I have created a release beep boop
1.5.3 (2024-01-30)
Bug Fixes

调整非自定义导航栏页面下的年面板动画垂直方向平移 (0467ec6)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/lspriv/wx-calendar/releases/tag/v1.5.3 :sunflower:

repo: lspriv/wx-calendar


text:
Body Composition Scale 2 Crash

Hello
Thanks for sharing your project.
Mi scale installed OK
Opening
Get values from MI scale
Scanning ..... and crash.
Galaxy s9+
Android 10
Thanks

Hi, thanks for a report. Try to give access to Location and Storage in Settings > Apps > MiScale Exporter > Permission.

Thanks,after add permition for storage is working.Thanks again

Your welcome

authors: dzuljo lswiderski

repo: lswiderski/mi-scale-exporter


text:
🛑 ZZVoice is down

In 5acb705, ZZVoice ($ZZVOICE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: ZZVoice is back up in ec8d7cc after 12 minutes.


text:
🛑 Mirror-爬 is down

In 2c80a86, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 404
Response time: 1047 ms

Resolved: Mirror-鱼露 is back up in d5d4c0b.


text:
🛑 Mirror-爬 is down

In dad3238, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 404
Response time: 1921 ms

Resolved: Mirror-鱼露 is back up in 3e7d364.


text:
🛑 Mirror-没有女朋友跨年的群傻逼 is down

In 83c7b65, Mirror-没有女朋友跨年的群傻逼 (https://x.ksfu.top/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mirror-木生 is back up in 14ad8ac.


text:
🛑 Mirror-爬 is down

In 8de2b60, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 404
Response time: 713 ms

Resolved: Mirror-鱼露 is back up in 978b878.


text:
🛑 Mirror-没有女朋友跨年的群傻逼 is down

In b37a395, Mirror-没有女朋友跨年的群傻逼 (https://x.ksfu.top/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mirror-木生 is back up in 7d8afe5.


text:
🛑 Mirror-爬 is down

In 6168d24, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mirror-鱼露 is back up in 5041607.


text:
🛑 Mirror-爬 is down

In d216568, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 404
Response time: 1251 ms

Resolved: Mirror-鱼露 is back up in a5a33f2.


text:
🛑 Mirror-爬 is down

In bea4442, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 404
Response time: 1126 ms

Resolved: Mirror-鱼露 is back up in 8af5018.


text:
🛑 Mirror-爬 is down

In fa9b17c, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 404
Response time: 1083 ms

Resolved: Mirror-鱼露 is back up in 00bfe7d.


text:
🛑 Mirror-爬 is down

In 7234067, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 404
Response time: 1096 ms

Resolved: Mirror-鱼露 is back up in 8846507.


text:
🛑 Mirror-爬 is down

In 902cc18, Mirror-爬 (https://ncov.zhouym.tech/) was down:

HTTP code: 404
Response time: 927 ms

Resolved: Mirror-鱼露 is back up in 5ade083.


text:
Support null safety

The library 'package:audioplayers/audio_cache.dart' is legacy, and should not be imported into a null safe library.
Try migrating the imported library.

Error: This project cannot run with sound null safety, because one or more project dependencies do not
support null safety:

- audioplayers

dependencies:
  audioplayers: ^0.17.0

@md84419
you can fix this by removing the ^ from ^0.17.0 then you will be able to run you app

@md84419
you can fix this by removing the ^ from ^0.17.0 then you will be able to run you app

The issue is not resolved by using 0.17.0 nor by changing the Kotlin version.  The audioplayers library is not currently compatible with the Flutter nullsafety feature.  The audioplayers developers need to produce a nullsafety-aware version of audioplayers.
More info is available here: https://dart.dev/null-safety/migration-guide

The issue is not resolved by using 0.17.0 nor by changing the Kotlin version.  The audioplayers library is not currently compatible with the Flutter nullsafety feature.  The audioplayers developers need to produce a nullsafety-aware version of audioplayers.
More info is available here: https://dart.dev/null-safety/migration-guide

This issue is really important for the use of this plugin in the future.

Done thanks to @wolfenrain and a lot of help from the community! 🎉

authors: alainseys jj-hoeksema luanpotter md84419

repo: luanpotter/audioplayers


text:
🛑 Školský šport is down

In 4b5d704, Školský šport (https://skolskysport.sk/) was down:

HTTP code: 403
Response time: 1018 ms

Resolved: Školský šport is back up in ffccf88.

repo: lubosm/minedusk-uptime


text:
🛑 Školský šport is down

In 1ad12fa, Školský šport (https://skolskysport.sk/) was down:

HTTP code: 403
Response time: 989 ms

Resolved: Školský šport is back up in 4a844ac.


text:
Method to get an sftp channel

So it can be used in jsch-nio for some operations where no command is needed (so as to not rely on unix tools)

I'm not sure this is the right place for this functionality...  The CommandRunner class was designed to run commands, not as an interface to the SessionFactory.

Yes, but this is the only place where the SSH session object is accessible. Otherwise, it would need more refactoring I guess.

Refactored...  Now there is an SftpRunner.  I will comment more on this ticket: https://github.com/lucastheisen/jsch-nio/pull/12

All set, let me know when you are ready for a release.

@lucastheisen Ready

authors: bpiwowar lucastheisen

repo: lucastheisen/jsch-extension